Hi,
On a Tizen wearable application developed in JavaScript, for the Gear S2, we are regularly sampling the user's heart rate with the HumanActivityMonitor API (every 15 minutes).
tizen.humanactivitymonitor.start("HRM", handleHRM)
For each of those sampling, we have to wait multiple measurements to maximize the chances to have a (positive) HR value. We stop the heart rate monitor (HRM), when we get this value or when exceeding a number of tries (180 tries, about 10 seconds).
Yet, after a certain amount of time, the HRM sampling is not working correctly: HRM is started fine (LED at the watch's back turns on), but the HRM is never stopped (it should stopped after 10 seconds max) the green LED at the watch's back is still on (HRM is still on going). The only way to stop the HRM is to wake up the watch and go back to our application.
We thought our application execution context might have changed so that the HRM stop code is no more run. It acts like if our application was put in sleep mode even if we still are measuring the HR. But according to our logs, the watch has not been switched into ambient mode. Moreover, even when requesting the CPU_AWAKE state during the sampling process, the behavior is the same.
Can you please tell us, according to you, why the green LED is always on?
Thank you for your help.