Languages

Menu
Sites
Language
Gear S3 Heart Rate reading 0's

Hello, 

I am building a web application for the Samsung Gear S3 Frontier on Tizen 2.3.2. I am trying to read the heart rate with the following code: 

function startRecording() {
	tizen.humanactivitymonitor.start('HRM', onchangedCB);
}
function onchangedCB(hrmInfo) {
    console.log('Heart Rate: ' + hrmInfo.heartRate);
    console.log(hrmInfo);
}

But the heart rate object is just 0's for heartRate and rRInterval. I have tested the native heartrate monitor app on the watch and it appears to work, and I am using a partner certificate. What could be wrong here and how do I fix it?

Thanks!

Responses

4 Replies
Armaan-Ul- Islam

HeartRate value 0 ?

- If you are testing on Emulator, please change the Heart rate value from Emulator Control Panel.

- If you are testing on real Gear S3 device, Don't keep the watch on desk...wear it and Please make sure you are wearing the watch tight. ...

 

If the Issue still persists, Please share the app (.wgt) file here which provides 0 heartRate (clean your proprietary code if needed) ....So that developers on the forum can reproduce the Issue and support. Thanks.

Matt Epstein

This result is produced when testing on the real S3 device. I was wearing it at the time of testing. During testing the green light in the back of the watch flashes. In the same position the native heartrate app works while the written one doesn't. The relevant code is already posted above. startRecording() is called, and the console logs empty hrmInfo objects (with 0's) many times a second.

Thanks in advance.

Armaan-Ul- Islam

Please test the Web Sample application for 'Heart Rate Monitor' on your Gear S3 device and observe the behavior.

 

Tizen-Studio IDE > New > Sample > Wearable 2.3.2 > Web Application > Sensor > 'Heart Rate Monitor'

 

If the app shows HRM data properly, then follow the source code of the sample. Otherwise, let us know on this thread...

Matt Epstein

Hi Armaan,

Thank you for your help. The issue seems to have resolved itself, the monitor was taking a long time to warm up and eventually outputted the heartrate, but now seems to be doing it more instantaneously but I am unsure of why.

Thanks!