AI-generated Key Takeaways
-
Disconnecting from Google Fit removes all app permissions, data recording subscriptions, and sensor registrations.
-
Apps need to provide a "Disconnect from Google Fit" option, triggering the
ConfigClient.disableFit()
method for disconnection. -
ConfigClient.disableFit()
revokes Google Fit access and stops data collection by the app.
Disconnecting from Google Fit revokes all granted OAuth permissions for your app and removes all recording subscriptions and sensor registrations made by your app.
You need to provide users with a Disconnect from Google Fit option
in your app settings. When users select this option, you can call the
ConfigClient.disableFit
method to disable Google Fit:
Kotlin
Fitness.getConfigClient(this, GoogleSignIn.getAccountForExtension(this, fitnessOptions)) .disableFit() .addOnSuccessListener { Log.i(TAG,"Disabled Google Fit") } .addOnFailureListener { e -> Log.w(TAG,"There was an error disabling Google Fit", e) }
Java
Fitness.getConfigClient(this, GoogleSignIn.getAccountForExtension(this, fitnessOptions)) .disableFit() .addOnSuccessListener(unused -> Log.i(TAG, "Disabled Google Fit")) .addOnFailureListener(e -> Log.w(TAG, "There was an error disabling Google Fit", e));