diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java
index ac91ad728..b2f7bbc74 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/huami/miband3/MiBand3Coordinator.java
@@ -76,6 +76,11 @@ public class MiBand3Coordinator extends HuamiCoordinator {
return true;
}
+ @Override
+ public boolean supportsActivityTracks() {
+ return true;
+ }
+
public static boolean getBandScreenUnlock() {
Prefs prefs = GBApplication.getPrefs();
return prefs.getBoolean(MiBandConst.PREF_MI3_BAND_SCREEN_UNLOCK, false);
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/ActivityKind.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/ActivityKind.java
index 4894da148..36d7cfa8a 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/ActivityKind.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/ActivityKind.java
@@ -37,8 +37,9 @@ public class ActivityKind {
public static final int TYPE_SWIMMING = 64;
public static final int TYPE_CYCLING = 128;
public static final int TYPE_TREADMILL = 256;
+ public static final int TYPE_EXERCISE = 512;
- private static final int TYPES_COUNT = 11;
+ private static final int TYPES_COUNT = 12;
public static final int TYPE_SLEEP = TYPE_LIGHT_SLEEP | TYPE_DEEP_SLEEP;
public static final int TYPE_ALL = TYPE_ACTIVITY | TYPE_SLEEP | TYPE_NOT_WORN;
@@ -73,6 +74,9 @@ public class ActivityKind {
if ((types & ActivityKind.TYPE_TREADMILL) != 0) {
result[i++] = provider.toRawActivityKind(TYPE_TREADMILL);
}
+ if ((types & ActivityKind.TYPE_EXERCISE) != 0) {
+ result[i++] = provider.toRawActivityKind(TYPE_EXERCISE);
+ }
return Arrays.copyOf(result, i);
}
@@ -98,6 +102,8 @@ public class ActivityKind {
return context.getString(R.string.activity_type_biking);
case TYPE_TREADMILL:
return context.getString(R.string.activity_type_treadmill);
+ case TYPE_EXERCISE:
+ return context.getString(R.string.activity_type_exercise);
case TYPE_UNKNOWN:
default:
return context.getString(R.string.activity_type_unknown);
@@ -121,6 +127,7 @@ public class ActivityKind {
return R.drawable.ic_activity_biking;
case TYPE_TREADMILL:
return R.drawable.ic_activity_walking;
+ case TYPE_EXERCISE: // fall through
case TYPE_SWIMMING: // fall through
case TYPE_NOT_WORN: // fall through
case TYPE_ACTIVITY: // fall through
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/BipActivityType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/BipActivityType.java
index d82d50d36..527469b02 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/BipActivityType.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/BipActivityType.java
@@ -22,7 +22,8 @@ public enum BipActivityType {
Outdoor(1),
Treadmill(2),
Walking(3),
- Cycling(4);
+ Cycling(4),
+ Exercise(5);
private final int code;
@@ -40,6 +41,8 @@ public enum BipActivityType {
return ActivityKind.TYPE_CYCLING;
case Walking:
return ActivityKind.TYPE_WALKING;
+ case Exercise:
+ return ActivityKind.TYPE_EXERCISE;
}
throw new RuntimeException("Not mapped activity kind for: " + this);
}
@@ -63,6 +66,8 @@ public enum BipActivityType {
return Cycling;
case ActivityKind.TYPE_WALKING:
return Walking;
+ case ActivityKind.TYPE_EXERCISE:
+ return Exercise;
}
throw new RuntimeException("No matching activity activityKind: " + activityKind);
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 304fc7900..3f90459c3 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -593,6 +593,7 @@
Activities
Biking
Treadmill
+ Exercise
Select all
Share
Reset fetch date