I will be as concise as possible. My app uses Fit History API to get daily steps for Android user. Everything works fine when installing the app from Android Studio or via side-loading. However, once I signed the APK and posted it on Play Store, the Fit History API part stopped working. To be more specific, the Play Services account fails to connect hence no access to fitness data.
Do you now why such discrepancies might be happening? I have a hunch that when publishing an app on Play Store I need to do something special with regards to the fact that my app uses Fit History API.
Have you got an OAuth 2.0 Client ID for your app? If so, I'd assume you used the SHA-1 of the debug signing certificate (the one that comes with the Android SDK). You have to register the fingerprint of the release certificate that you use to sign the APK:
keytool -exportcert -list -v -alias <your-key-name> -keystore <path-to-production-keystore>
Once you get the fingerprint you have to go to the Google API Console and create or edit a project with this fingerprint.