Q: GoogleFit/Health Connect - Android. Connection is working on debug mode but not in release mode

CriticalManatee1 month ago

Currently, I'm working on a Flutter app, and on Android specifically, on debug mode(dev mode) the Google Fit integration works just fine, however when I run the app in release mode(for testing nor sending to the stores) the integration fails without a meaningful message


Chandruadmin1 month ago

Hey there

In order to produce a release build, you will need to complete the GOING LIVE section of Android SDK setup guide. Where you will need to complete this form to get permissions to use the Google Health Connect api in production.

You will need to:

  1. Specify which data types you intend to read from Health Connect
  2. For each permission which you are not using, add the following lines to your AndroidManifest.xml
<uses-permission android:name="android.permission.health.READ_HEART_RATE" tools:remove="true"/>

Once these steps are completed, the build should run without crashing. Hope this helps!