Languages

Menu
Sites
Language
sHealth API für Web Apps needed!
Hi, I would really appreciate a possibility to acquire the daily steps count as well as the user's individual steps goal from the sHealth app data, to use in my web app watch faces. The data is there, sHealth has it. Why can't I access that data via a JavaScript API?

Responses

4 Replies
Iqbal Hossain

hi 

Follow the steps:- 

  1. To register an event handler for accumulative pedometer changes, use thesetAccumulativePedometerListener() method of the HumanActivityMonitorManager interface (in mobileand wearable applications):
    function onchangedCB(pedometerInfo)
    {
       console.log("Step status: " + pedometerInfo.stepStatus);
       console.log("Speed: " + pedometerInfo.speed);
       console.log("Walking frequency: " + pedometerInfo.walkingFrequency);
       /* Deregisters a previously registered listener */
       tizen.humanactivitymonitor.unsetAccumulativePedometerListener();
    }
    
    tizen.humanactivitymonitor.setAccumulativePedometerListener(onchangedCB);
  2. To stop receiving notifications about the accumulative pedometer changes, use theunsetAccumulativePedometerListener() method of the HumanActivityMonitorManager interface:
    tizen.humanactivitymonitor.unsetAccumulativePedometerListener()

Ref: 

1. https://developer.tizen.org/ko/development/guides/web-application/sensors/human-activity-monitor?langredirect=1

2. https://developer.tizen.org/development/api-references/web-application?langswitch=en&redirect=%2Fdev-guide%2F2.3.1%2Forg.tizen.web.apireference%2Fhtml%2Fdevice_api%2Fwearable%2Ftizen%2Fhumanactivitymonitor.html

 

Alex Schlei

Hi, thank you for your efford.

Unfortunately this information is not new to me and it's not what I am looking for. This approach gathers  "fresh" data from the watch's pedometer directly. I want the existing data that sHealth app is already gathering though, as well as the user's individual steps goal also set in sHealth. This can only be achieved via complex wordarounds requiring user input as well. So my post was not really a question for an alternative solution (as I am pretty sure there is none), it was rather a cry for help towards Samsung as in "Hey Samsung, go build a web API for sHealth data!"... ;-)

There should be a data file generated by sHealth but it doesn't seem to be accessible through the standard file system. If anyone has an idea for how to get to that data, I'd still be very grateful...

 

 

Jader Carvalho de Medeiros

Hi Alex. Did you found the solution for your problem (this is my problem too).

John Ixion

you'll find more info here: http://developer.samsung.com/health