03-02-2022 03:48
03-02-2022 03:48
I'm not sure how to add a step counter to my custom watch, I've tried everything I could with my nonexistent programming skills when I try to download a watch face off Github to use as an example it just doesn't work on my versa 3.
TLDR; how do I add a step counter to the digital watch template.
03-02-2022 11:30
08-23-2022 12:14
08-23-2022 12:14
Riding on this question, can I use userActivity.today.adjusted["steps"] in realtime? For instance, I want to capture when the user starts/stops walking so I can save the timestamp in my app?
Thanks in advance!
08-23-2022 12:21 - edited 08-23-2022 20:48
08-23-2022 12:21 - edited 08-23-2022 20:48
@ac_devel- it depends on the precision you want. The watch doesn't always deliver steps in real time, especially when it concerns dominant hand.
Instead it batches steps and then delivers them if it is considered movement during stop/start conditions. Once motion is continuous it's not so much a problem.
Author | ch, passion for improvement.
08-23-2022 12:29
08-23-2022 12:29
as long as it's not delayed too much, I can accept it. As long as I can catch the time stamp for start and stop.
the other idea would be to align my app's data to the user's steps time series but having all in the same file from the app would be good.
08-23-2022 12:33 - edited 08-23-2022 12:34
08-23-2022 12:33 - edited 08-23-2022 12:34
I'd say you could do so with a start/stop button.
Read timestamp on press and then calculate the steps for this activity by storing steps at start in a variable.
Then calculate stepsAtStop - stepsAtStart.
Similar for both timestamps to calculate activity duration.
08-23-2022 13:00
08-23-2022 13:00
That's an interesting idea. However I want to try to catch it without the buttons since I want to capture the steps even when users wake up in the middle of the night. I can't really ask them to push a button.
08-23-2022 13:28
08-23-2022 13:28
I've found that it usually kicks in after about 10 steps. That's probably close enough.
You'd probably want to filter the data so it doesn't include small sequences, like crossing the room.
08-24-2022 10:02
08-24-2022 10:02
I ended up using an interval that checks for the steps. It runs every minute (simulating what happens with Fitbit's steps time series). I check the difference from the previous step count to see if the user moved.
Thank you for your help!
08-25-2022 16:13
08-25-2022 16:13
Follow up on this: the method I am using is not right. It's too sensitive to movements that one of my users looked like they were sleep walking. lol! Also I checked out their intraday series and no steps were logged with the time my app registered their log. Small steps are okay since I want to see if they wake up at night and get out of bed however I noticed some people have <10 steps and they said they didn't stand up at all while some have null (which I cannot explain since a-b at most can be a negative number and not a null).
The safest way I get is probably to get the intraday activity since it's post-processed by fitbit. I tried using the api with python.