Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.3k views
in Technique[技术] by (71.8m points)

Google sign-in does not work for Fitness API on Android

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.5k users

...