07-20-2020 04:21
07-20-2020 04:21
Hi,
I have tried retrieving Hourly Activity, but couldn't find any reference to get that.
Let me know if it is possible to add to watch face development.
Screenshot attached for reference.
07-20-2020 13:42
07-20-2020 13:42
https://dev.fitbit.com/blog/2019-10-29-announcing-fitbit-os-sdk-4.0/#activity-history-api
07-21-2020 06:25
07-21-2020 06:25
This only speaks of minute history and day history, have they added the much needed hourly history?
07-21-2020 09:00
07-21-2020 09:00
it doesn't really say if Hourly steps can be retrieved.
07-21-2020 13:42
07-21-2020 13:42
No, the API doesn't provide hourly history.
07-22-2020 12:13
07-22-2020 12:13
You might want to vote for this feature suggestion:
I posted this over 2 years ago asking for this functionality.
John
07-22-2020 18:54
07-22-2020 18:54
Thanks, I voted for this.
07-26-2020 14:00
07-26-2020 14:00
This is a reprint from an earlier post but still valid...
Yeah,...my solution to recording hourly steps was to trigger a record every hour. If the user switched to something else, it pro-rates the accumulated steps to each hour that has passed after control is returned to the watch face. It's not perfect but usually close enough to determine if 250 steps were walked in each passing hour.
I did try the step history and it absolutely does work as explained, but the neither time frame available was helpful for recording hourly steps.
Regards,
Reign
07-27-2020 05:10
07-27-2020 05:10
I tried to use minute activity, but the results are empty records. Are there samples how to use the API?
07-27-2020 13:49
07-27-2020 13:49
There are examples here. I don't think the simulator simulates history (but I could be wrong).
07-29-2020 10:12
07-29-2020 10:12
Hello AjaySingh,
If you would like to test (play around with) activity history,
here is a short example you can start with:
import {minuteHistory,dayHistory} from "user-activity"
let tHistory = dayHistory.query()
for (let index1 in tHistory){
let tString = "index:" + index1
let tElements = tHistory[index1]
for (let index2 in tElements){
if (index2 != "constructor") tString += ", " + index2 + ":" + tElements[index2]
}
console.log(tString)
}
Example result is: [11:58:59 AM]index:2, steps:29, distance:21, calories:4, floors:0, averageHeartRate:93, restingHeartRate:undefined
Note that minuteHistory is limited to 60 minutes, dayHistory is limited to 6 days.
The dayHistory format and minuteHistory format are basically the same.
dayHistory delivers simulated data in the simulator. minuteHistory does not; it delivers undefined values.
There is no hour history equivalent ...yet. It seems likely to follow a similar format if or when they do add it.
Regards,
Reign
07-30-2020 06:12
07-30-2020 06:12
Thank you Reign,
I will try playing with the code you have provided and submit back if find any better solution.