diff --git a/app/src/main/assets/fossil_hr/widgetCustom0.bin b/app/src/main/assets/fossil_hr/widgetCustom0.bin
new file mode 100644
index 000000000..12acd2a53
Binary files /dev/null and b/app/src/main/assets/fossil_hr/widgetCustom0.bin differ
diff --git a/app/src/main/assets/fossil_hr/widgetCustom1.bin b/app/src/main/assets/fossil_hr/widgetCustom1.bin
new file mode 100644
index 000000000..12acd2a53
Binary files /dev/null and b/app/src/main/assets/fossil_hr/widgetCustom1.bin differ
diff --git a/app/src/main/assets/fossil_hr/widgetCustom2.bin b/app/src/main/assets/fossil_hr/widgetCustom2.bin
new file mode 100644
index 000000000..12acd2a53
Binary files /dev/null and b/app/src/main/assets/fossil_hr/widgetCustom2.bin differ
diff --git a/app/src/main/assets/fossil_hr/widgetCustom3.bin b/app/src/main/assets/fossil_hr/widgetCustom3.bin
new file mode 100644
index 000000000..12acd2a53
Binary files /dev/null and b/app/src/main/assets/fossil_hr/widgetCustom3.bin differ
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceFactory.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceFactory.java
index 3598d8cf1..e4b87efc2 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceFactory.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceFactory.java
@@ -71,6 +71,10 @@ public class HybridHRWatchfaceFactory {
case "widgetCalories":
case "widgetActiveMins":
case "widgetChanceOfRain":
+ case "widgetCustom0":
+ case "widgetCustom1":
+ case "widgetCustom2":
+ case "widgetCustom3":
widget.put("type", "comp");
widget.put("name", widgetDesc.getWidgetType());
widget.put("goal_ring", false);
@@ -143,6 +147,10 @@ public class HybridHRWatchfaceFactory {
if (includeWidget("widgetActiveMins")) code.put("widgetActiveMins", context.getAssets().open("fossil_hr/widgetActiveMins.bin"));
if (includeWidget("widgetChanceOfRain")) code.put("widgetChanceOfRain", context.getAssets().open("fossil_hr/widgetChanceOfRain.bin"));
if (includeWidget("widget2ndTZ")) code.put("widget2ndTZ", context.getAssets().open("fossil_hr/widget2ndTZ.bin"));
+ if (includeWidget("widgetCustom0")) code.put("widgetCustom0", context.getAssets().open("fossil_hr/widgetCustom0.bin"));
+ if (includeWidget("widgetCustom1")) code.put("widgetCustom1", context.getAssets().open("fossil_hr/widgetCustom1.bin"));
+ if (includeWidget("widgetCustom2")) code.put("widgetCustom2", context.getAssets().open("fossil_hr/widgetCustom2.bin"));
+ if (includeWidget("widgetCustom3")) code.put("widgetCustom3", context.getAssets().open("fossil_hr/widgetCustom3.bin"));
} catch (IOException e) {
LOG.warn("Unable to read asset file", e);
}
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceWidget.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceWidget.java
index 246157730..f0351404b 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceWidget.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceWidget.java
@@ -59,6 +59,10 @@ public class HybridHRWatchfaceWidget {
widgetTypes.put("widgetCalories", context.getString(R.string.watchface_widget_type_calories));
widgetTypes.put("widget2ndTZ", context.getString(R.string.watchface_widget_type_2nd_tz));
widgetTypes.put("widgetActiveMins", context.getString(R.string.watchface_widget_type_active_mins));
+ widgetTypes.put("widgetCustom0", context.getString(R.string.watchface_widget_type_custom_0));
+ widgetTypes.put("widgetCustom1", context.getString(R.string.watchface_widget_type_custom_1));
+ widgetTypes.put("widgetCustom2", context.getString(R.string.watchface_widget_type_custom_2));
+ widgetTypes.put("widgetCustom3", context.getString(R.string.watchface_widget_type_custom_3));
// widgetTypes.put("widgetChanceOfRain", context.getString(R.string.watchface_widget_type_chance_rain)); // Disabled due to missing support in Gadgetbridge
return widgetTypes;
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 6c88ef42a..d3320de37 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1376,5 +1376,9 @@
30 minutes
1 hour
3 hours
+ Custom widget 0
+ Custom widget 1
+ Custom widget 2
+ Custom widget 3
diff --git a/external/build_fossil_hr_watchface.sh b/external/build_fossil_hr_watchface.sh
index 699b2ffb9..fa5047afb 100755
--- a/external/build_fossil_hr_watchface.sh
+++ b/external/build_fossil_hr_watchface.sh
@@ -14,5 +14,9 @@ $jerry generate -f '' widget_calories.js -o widgetCalories.bin
$jerry generate -f '' widget_2nd_tz.js -o widget2ndTZ.bin
$jerry generate -f '' widget_activemins.js -o widgetActiveMins.bin
$jerry generate -f '' widget_chanceofrain.js -o widgetChanceOfRain.bin
+$jerry generate -f '' widget_custom.js -o widgetCustom0.bin
+cp widgetCustom0.bin widgetCustom1.bin
+cp widgetCustom0.bin widgetCustom2.bin
+cp widgetCustom0.bin widgetCustom3.bin
popd
mv fossil-hr-watchface/*.bin ../app/src/main/assets/fossil_hr/