Languages

Menu
Sites
Language
Retrieve heart rate monitor data from a long period of time

Hi.

I'm trying to create a web app for Tizen 3.0 wearable that would gather heart rate monitor data troughout the night. Data then would be send to cloud and analysed. Is there a way to retrieve the heart rate data from Tizen watch without the constant listening to the monitor? The main problem of the monitor is that after some time app is put to sleep by the system. And even with all background-enabled flags, I get many 5-10 minute holes in my HR data after a night.

So I was wandering if there is an API similar to Apple Health Kit, that allows to get the sensor data for a period of time? The ideal situation would be if my app could call this API for all heart rate measurements from the last 8 hours.

Also I've noticed that on my Samsung Gear Sport, the green LED is blinking all the time even when I'm sleeping, so I'm guessing that the system is getting my HR data all this time.

 

Cheers, Damian :)

Responses

5 Replies
André Reus

hi  Damian Michalak, You may use Recording feature  of Tizen Sensor API. Although i am not sure if the HRM  supports it or not .... 
If not you can use javascript interval to get the value continuously ... if case your app goes to sleep you may use CPU_AWAKE of power api to awake the CPU. hope this will help you to solve your problem ... thanks

Damian Michalak

Thank you for your response André.

 

Unfortunately documentation does not provide any information about recording the HRM, only PRESSURE. Also I tried to record something using the example from the documentation: https://developer.tizen.org/development/guides/web-application/sensors/human-activity-monitor#record - I changed "PRESSURE" to "HRM". But nothing was recorded, I only get this error: NotFoundError: Failed to read recorded data.

GEUNSOO KIM

On the offline help documents, there is some tutorial about HRM. you'd better refer the document.

to get the offline help docs,

1. Download the JAR files from http://download.tizen.org/sdk/documents.

2. Save the JAR files to the /<TIZEN_SDK_HOME>/ide/plugins directory.

3. re-start tizen studio

then menu help > help contents will open the offline docs.

The docs seems stopped updating since 2.4, but still useful.

find the article "Human Activity Monitor: Retrieving User Activity Data from the Various Device Sensors" from the doc.

or navigate to "Tutorials > Web Application > Tizen Features > System".

** One tip. Because the default help browser is quite limited in usability, I changed the help browser with web browser.

change option from menu  "Window > Preference > Other > Help > Open help contents" to "In an external browser"

good luck.

GEUNSOO KIM

One more thing. I bet the gear device will fall into sleep mode no mater what you do in your program.

To avoid the issue, set "alarm" on your program to wake up. recommended interval is 10 minutes at least.

If you need to get the data more frequently, then you are out of luck.

 

André Reus

Yeah Alarm API would be good solution .... 
Damian Michalak, you may try it ..