Languages

Menu
Sites
Language
How to do step counter in watch face?

I wanted to add step count to my watch face. It seems that it is "Accumulative walking and running step count since the device is booted.”

What we are really looking into is step count per day, do I need to keep a database of records everyday and minus the previous days?
And the step count needs to be identical to what Gear S2 shown in other watch faces.

Wondering there is an API for reading today’s step count?

Responses

1 Replies
Nafisul Islam Kiron

I could not find a way from GWD.

But in native app you can easily do that the way you said, using database.

You don't have to subtract the data from previous day because you can keep record for the current day and then add up any extra works by updating that day's record only.

https://developer.tizen.org/dev-guide/2.4/org.tizen.web.apireference/html/device_api/mobile/tizen/humanactivitymonitor.html#PedometerStepStatus

 

*Don't forget to add any required privileges in your app.