-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
How to use AggregateGroupByPeriodRequest and AggregateGroupByDurationRequest? #16
Comments
Hi Yes! You can find it in the documentation below: https://matinzd.github.io/react-native-health-connect/docs/api/methods/aggregateRecord Each record type has its own result type. You can try Example: aggregateRecord({
recordType: 'Steps',
timeRangeFilter: {
operator: 'between',
startTime: new Date(
new Date().getTime() - 7 * 24 * 60 * 60 * 1000 // 7 days
).toISOString(),
endTime: new Date().toISOString(),
},
}).then((result) => {
console.log(result.COUNT_TOTAL);
}); |
Thanks for the quick reply. |
Thanks for pointing these out. I think these were added in the recent versions and it's not supported yet. I will add those to the roadmap. |
@matinzd @nightskyhub i want display all vitals and steps and burned calories sleep ...etc is is possible to display all this stuff thanks in advance |
Hi @matinzd, When we can expect this feature, we are facing performance issue due to this. iOS by default provide payload in 1 Hour range |
Hello @matinzd, Is there a plan to fulfil this feature? |
If someone is up for sponsoring I will dedicate some time to implement it. Otherwise you can fork the project and add it yourself. |
How can we aggregate steps data for day.
Let's say I want to fetch data for past 7 days and want count of total steps per day.
The text was updated successfully, but these errors were encountered: