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

Health Data Fetching Returns Limited Results health: ^8.0.0 (with health connect enabled) #833

Closed
simplayy opened this issue Nov 14, 2023 · 1 comment · Fixed by #884
Closed
Labels
bugfix a bug fix

Comments

@simplayy
Copy link

In the current implementation of the health data fetching function, the returned results are limited to a maximum of 1000 data points, even when the actual number of data points is much higher.
This issue occurs when fetching health data from the last 7 days using the getHealthDataFromTypes function.
The expected behavior is that the function should return all available data points within the specified date range.

// fetch health data from the last 7 days
List<HealthDataPoint> healthData = await health.getHealthDataFromTypes(now.subtract(Duration(days: 7)), now, types);
print("Health data length: ${healthData.length}");

In the above code snippet, healthData.length returns 1000, even when the actual number of data points is higher.

Device / Emulator and OS

Please complete the following information for each phone and/or emulator you're experiencing this bug on:

  • Device: POCO F3
  • OS: Android 13
@armanso
Copy link
Contributor

armanso commented Dec 20, 2023

Hey @simplayy, we faced the same issue and figured out that there was a missing implementation at the Health Connect level. This has been addressed in the following pull request: #862.

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

Successfully merging a pull request may close this issue.

2 participants