WIP: Sleep as Android support #3188
No reviewers
Labels
No Label
device mi band 7
activity post processing
activity/health
Android 12
Android 13
android integrations
architecture
Bangle.js
bug
changes requested
charts
details not provided
developer documentation
device amazfit band 5
device amazfit bip
device amazfit cor
device Casio
device fossil
device garmin
device gtr 2e
device gts 2 mini
device h30
device hplus
device huami
device Huawei
device liveview
device mi band
device mi band 2
device mi band 3
device mi band 4
device mi band 5
device mi band 6
device no.1 f1
device pace
device pebble
device pebble 2
device pinetime infinitime
device request
device sony
device support
device watch 9
device xiaomi
discussion
documentation
duplicate
enhancement
feature request
Gadgetbridge
good first issue
help wanted
i am developing my own app can you help
icebox
intent api
internationalisation
invalid
needs work
network companion app
new device
no feedback
not a bug
notifications
one of the 1000 issues about disconnection
pairing/connecting
potentially fixed / confirm and close
question
research
security
seems abandoned
Solved, waiting for F-Droid release
suggest to close
task
user interface / UX
wear os
weather
wontfix
Zepp OS
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Freeyourgadget/Gadgetbridge#3188
Loading…
Reference in New Issue
No description provided.
Delete Branch "MOrth/Gadgetbridge:feature/sleepAsAndroidIntegrationForMiBand"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WIP
FYI, I have pushed
708cb0c617
to master, which attempts to parse the raw sensor values for Zepp OS devices. I am not sure if older devices send the data in the same format, but hopefully this helps.@ -0,0 +40,4 @@
case "com.urbandroid.sleep.watch.HINT":
// TODO: Make wrist band vibrate
break;
case DeviceService.ACTION_REALTIME_SAMPLES:
@joserebelo I wanted to leverage the
DeviceService.ACTION_REALTIME_SAMPLES
intent to hook into the existing HR gathering flows. However my receiver does not receive it here, eventhough I am 100% sure it is getting sent on the heart rate test.Could you please check if I somehow registered this wrong or am misunderstanding something else?
You are registering the receiver in the pairing activity, which is only used during pairing.
You need to handle this in the support class, see:
bdb904faf9/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java (L1564)
to enable real-time HR measurementbdb904faf9/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java (L2557)
where we enable the realtime samples supportbdb904faf9/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java (L2366)
where we pass the heart rate to the real-time samplesWe'd need some similar logic to send it to the sleep as android receiver.
Superseded by !3687
Pull request closed