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
In my case, I changed the apk name but failed to update it in the OAuth credentials console. Then my onActivityResult code gave me RESULT_CANCELLED. As soon as I corrected the apk name, everything started working again.