Reputation: 21
So I am working on a project that uses health connect to display user health related data(Steps, Heart Rate...). But currently my app crashes with the following error sometimes:
android.os.RemoteException: Request rejected. Rate limited request quota has been exceeded. Please wait until quota has replenished before making further requests.
I kind of understand this error in the case that I think I have exceeded the quota for the amount of API calls I can make, but is there any interface or something I can use to see this imposed limit for healthConnect?
Currently I am using the following health package for my flutter app: https://pub.dev/packages/health
I have also looked at the following resources:
https://developer.android.com/guide/health-and-fitness/health-connect-guidelines/rate-limiting
And the only solution I saw was that to limit API calls, a technique called channelLog handling should be used, but in order to use that I need to make a call for getChangesToken(https://developer.android.com/guide/health-and-fitness/health-connect/common-workflows/sync-data#pull-data), but I believe currently the flutter health package doesn't support that...
So currently is there just no way of taking into account this error currently for a flutter app using healthConnect?
I apologize for the convoluted post, but kind of just need help with getting a sense of direction!
Any help would be very much appreciated!
Upvotes: 2
Views: 1154