mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 05:16:51 +01:00
Bangle.js: Allow an activity sample to have a time specified - first steps in allowing Bangle.js to send 'missed' health data
This commit is contained in:
parent
93e8996b52
commit
e59375242e
@ -569,6 +569,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
sample.setTimestamp((int) (GregorianCalendar.getInstance().getTimeInMillis() / 1000L));
|
||||
int hrm = 0;
|
||||
int steps = 0;
|
||||
if (json.has("time")) sample.setTimestamp(json.getInt("time"));
|
||||
if (json.has("hrm")) hrm = json.getInt("hrm");
|
||||
if (json.has("stp")) steps = json.getInt("stp");
|
||||
int activity = BangleJSSampleProvider.TYPE_ACTIVITY;
|
||||
|
Loading…
Reference in New Issue
Block a user