My Android app targets SDK 28 and connects to Google Fit to upload data and read some other data. The app uses the HistoryAPI to read com.google.step_count.delta data.
This documentation claims that "com.google.android.gms.permission.ACTIVITY_RECOGNITION permission is converted into a pre-granted runtime permission" if the app targets SDK 28 but runs on SDK 29: https://developers.google.com/fit/android/authorization#android_permissions
I have added to the app's manifest like the documentation says to do.
When this Android app is on a device running Android 10 (SDK 29) and the user connects to Google Fit for the first time, I get a log saying:
There was a problem subscribing.com.google.android.gms.common.api.ApiException: 10: SecurityException: com.google.step_count.delta requires android.permission.ACTIVITY_RECOGNITION
Yet the documentation claims that this will be converted into a pre-granted runtime permission.
The team is not ready to migrate the app's target SDK to 29 just yet, so how can we continue to get com.google.step_count.delta data without this error?
I am assuming that this log means it didn't actually connect as there was no log statement that said:
Successfully subscribed to com.google.step_count.delta