I am trying to use google fit api in my android app. I followed this guide and created SHA-1 certificate using keytool.exe in my jdk 1.8 bin folder. I have now created Oauth
I had similar issue and solve it by unifing the version number for both fitness
and auth
dependencies in the build.gradle
file.
implementation "com.google.android.gms:play-services-fitness:18.0.0"
implementation "com.google.android.gms:play-services-auth:18.0.0"
Previously I was using auth:17.0.0
and that caused the feature to fail on random bases (yes, it was working sometimes and failing on others).
So I think it is worth checking your dependancies if the solutions above didn't help.