From 9a962bd495c6c0862b0ce46059b93050a1104bfb Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Fri, 15 Nov 2024 10:21:00 +0000 Subject: [PATCH] Bangle.js: Support sending activity type from Bangle (#4323) --- CHANGELOG.md | 1 + .../banglejs/BangleJSSampleProvider.java | 11 ++------- .../banglejs/BangleJSDeviceSupport.java | 23 ++++++++----------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 397589b46..64592a153 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ * Xiaomi-protobuf: Improve workout parsing * Zepp OS: Add sleep respiratory rate chart * Zepp OS: Send notification pictures +* Bangle.js: Support sending activity type from Bangle #### 0.82.1 * Huawei: Improve activity parsing diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/banglejs/BangleJSSampleProvider.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/banglejs/BangleJSSampleProvider.java index 6a7b0c559..304e590cf 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/banglejs/BangleJSSampleProvider.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/banglejs/BangleJSSampleProvider.java @@ -40,8 +40,6 @@ public class BangleJSSampleProvider extends AbstractSampleProvider getSampleDao() { return getSession().getBangleJSActivitySampleDao(); @@ -67,17 +65,12 @@ public class BangleJSSampleProvider extends AbstractSampleProvider0) { sleepAsAndroidSender.onHrChanged(hrm, 0); } sample.setTimestamp(timestamp); - sample.setRawKind(activity); + sample.setRawKind(activity.getCode()); sample.setHeartRate(hrm); sample.setSteps(steps); sample.setRawIntensity(intensity);