Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get aggregate steps for previous days? #116

Closed
bitdelve opened this issue Jul 16, 2024 · 2 comments · Fixed by #157
Closed

Get aggregate steps for previous days? #116

bitdelve opened this issue Jul 16, 2024 · 2 comments · Fixed by #157

Comments

@bitdelve
Copy link

Is it possible to get the total steps for each day in the past, but not combined? I.E. I want to get the steps from up to 14 days ago, but not all the steps for the 14 days. So I would want to retrieve all steps for 2024/07/12, then 2024/07/13, etc. From what I see it looks like i have to call aggregateRecord for each day. Or readRecords and then manually combine.

@seanblonien
Copy link

@matinzd I would also be very interested in the "Reading aggregate data" feature as well

I notice this react-native-health-connect library implements the "Read raw data" API, but is missing the "Read aggregate data" APIs

was there a plan to eventually implement these APIs? the Bucket API/concept sounds extremely useful considering different Android tracking apps track and group data differently making it difficult to aggregate since the intervals are not guaranteed to be consistent interval (i.e. intervals for step data can be 5 minutes apart or hours apart depending on the app). I have had to make a hacky fix to "standardize" the inconsistent intervals from the various sources, and this bucket API would address it out right

I may be interested in contributing, but I only know JavaScript, so if you believe I could just follow the patterns you set and implement the aggregate data one, I could be convinced to try it out

@taisuke-j
Copy link
Contributor

Yes, same for our team which is currently actively developing a new health app integrating Health Connect. Any information about plans/ongoing development for AggregateGroupByDurationRequest would be highly appreciated.

https://developer.android.com/health-and-fitness/guides/health-connect/develop/aggregate-data#buckets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants