Does heart rate come from the OHR or from the chest strap?

Hi all,

I have an activity and I want to determine whether the measured heartbeat comes from the OHR or from a chest strap.

Is there a way to determine the source exactly?


Currently I read the heartbeat via Activity.getActivityInfo().currentHeartRate

If I use the example with the sensor

Sensor.setEnabledSensors([Sensor.SENSOR_HEARTRATE]);

Sensor.enableSensorEvents(method(:onSnsr));

I always get a value displayed – whether I use the chest strap or not.

Does anyone have any ideas or examples?

Thanks in advance

Jens

  • I never understood what is that setEnabledSensors for with regards for HR, because I always get the HR both in my DF and my watch-app, without ever calling that function. Maybe it's needed if I'd want sensor logging?

  • With OHR, there are two mode.  A 24/7 mode and an activity mode.  With 24/7, it's not as accurate - to prolong battery life.  You can tell what mode the watch is in by peeking under the back. If the lights are flashing, it's 24/7.  Solid, activity mode.

    If you are in an activity and an external HRM is connected as a normal sensor, they are off.

    In 24/7 mode, you can still display the value, but understand it's not as accurate.  In a watch app, if you've enabled the sensor, the leds don't blink and you are getting a more accurate reading.  If you don't, you are still in 24/7 mode and blinking

    And with a native activity, it's in activity mode unless an external HRM is connected and is controlled by the native activity, and not the DF itself.

  • I just checked with my watch-app (Hiker) and I see it stopped blinking and the led turned on all the time. However before I started the app the led was blinking in green, after I started the app it changed to full red.

  • Are you enabling the HR Sensor, thinking it's only for an external sensor?

  • No, as I wrote above, I don't have setEnabledSensors in my code. Only the permissions in the manifest and I create a session in the watch-app.