Hi,
Do I have to use ActivityMonitor.getHeartRateHistory,
SensorHistory.getHeartRateHistory or currentHeartRate from Activity.getActivityInfo()
What is the correct way?
Do you have any exemple?
Thanks
Hi,
Do I have to use ActivityMonitor.getHeartRateHistory,
SensorHistory.getHeartRateHistory or currentHeartRate from Activity.getActivityInfo()
What is the correct way?
Do you have any exemple?
Thanks
To do 1hz HR, you start with Activity.Info.currentHeartrate.
if that's null, then fall back to getheartRateHistory and use the newest sample.
You want to include the fallback, as on devices like the f5x, Activity.Info.currentHeartRate might might have a value, but there is one in history.
For HR and 1hz, one thing I always do is only update it in onPartialUpdate if it's changed, and not every time. You can reduce the size of the clip region, which helps with the power budget. I did some tests a few years back, and I was seeing the HR change maybe 30 times a minute and not 60, so that had a significant impact on the power budget. (at least with digital FWs were seconds were in a fixed location)