megahealth / TestBleLib

Android megablelibopen.aar Demo usage
5 stars 1 forks source link

Daytime vs Sleep Mode #3

Open jayfar opened 1 year ago

jayfar commented 1 year ago

In the official MegaHealthPro app, my question is about the two buttons Daytime and Sleep.

image

Question 1) Looking at the README.MD file, I do not understand how to put the Ring device into each of the modes Daytime or Sleep. When calling client.enableV2ModeSpoMonitor(true); how do I specify if the mode is Daytime or Sleep?

Question 2) Once the Ring device is in either Daytime or Sleep mode, how do I detect what mode the RING is in? void onV2ModeReceived seems to always return MegaBleConst.MODE_MONITOR

Unrelated Question 3) I am not seeing void onIdle() being called in my project after connecting to the ring. Are there conditions that would prevent this from being called?

macflyang commented 1 year ago

Hello !

  1. Both enabling daytime mode and enabling sleep mode enable blood oxygen mode client. enableV2ModeSoMonitor (true). However, restrictions were made at the end of the monitoring, and we limited daytime mode to at least 2 minutes and enabling sleep mode to at least 30 minutes. Also, during UI display. The sleep staging data is not displayed in daytime mode, and the generated sleep data is discarded. ^ ^

  2. Enabling daytime mode and sleep mode is only marked locally in storage; If you change your phone or connect to the ring, the current mode is sleep mode. If you want to be precise, you can upload this tag to the server

  3. Did onIdle() not call? Has the ring been bound. Simple process: 1. Connect the ring 2. After successfully shaking and binding 3. Turn on sleep or exercise modes.

Please use SDK demo for testing before integrating the SDK; Familiar with SDK internal methods and the process of connecting, binding, and opening modes; So that you can better integrate the SDK.