# Disconnect from Google Fit

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`](https://developers.google.com/android/reference/com/google/android/gms/fitness/ConfigClient#public-taskvoid-disablefit)
method to disable Google Fit:

### Kotlin

```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

```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));
```