googlearchive / android-fit

Migrated:

Home Page:https://github.com/android/fit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

keep getting SIGN_IN_FAILED when requesting history data in my own app.

eggman87 opened this issue · comments

Do we need to include the api key? If so what is the name of it in the meta data tag.

commented

I am seeing this same issue. What did you do to resolve this issue? @eggman87

@RyanNewsom I honestly can not remember. I closed it because it was something obvious but not well documented.

Make sure you have oauth credentials setup in the api console.
Make sure you also have enabled fitness api.

https://support.google.com/cloud/answer/6158857?hl=en

commented

Thanks, I actually got it working right after I asked you.
👍

Make sure your Consent Screen is also configured within your Cloud project as well as the packageName and SHA1 for the cert you're using are also registered (even if just building a debug build). I don't believe the API key needs to be specified for FIT, but it is used for Maps.

commented

I said I had it working, but thank you!

Yep, saw that @RyanNewsom Just wanted to log some resolution steps for others that stumbled upon this issue (like you did).