I have just started working with the Fitness API for Android. I started my journey on Google's Android developer site and followed the steps to set up my first application. I created my Client ID and OAuth scopes, added my email address as a test user.
Then I followed the steps described here to retrieve some historical data: https://developers.google.com/fit/android/api-client-example (I won't post code snippets as it is exactly like the one found under the link.)
After starting the application on either my device or an emulator, I see Google's login screen, select the correct account. But then a loading screen comes up that never finishes. My Activity's onActivityResult() function is never called.
I was thinking maybe I did something wrong when setting up the project, so I pulled the sample from the Fit Samples GitHub repository. I imported the project, and again, I set up a new project in Google APIs: https://github.com/android/fit-samples/tree/master/BasicHistoryApiKotlin
I started the app, but the result was the same.
The Logcat does not report any errors or warnings, so I'm blind here.
Did anyone else encounter this issue and knows what I missed and what I should do? Or does anyone maybe have a working example?
Many thanks
hi @piet90 I was able to work around the issue, I followed this: https://github.com/android/fit-samples/issues/58
I think it works in all cases, you need to delete your project in Google Console and recover it after.