# InteractiveWatchFaceClient.ClientDisconnectListener

Artifact: [androidx.wear.watchface:watchface-client](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/client/InteractiveWatchFaceClient.kt+class:androidx.wear.watchface.client.InteractiveWatchFaceClient.ClientDisconnectListener) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***


```
public interface InteractiveWatchFaceClient.ClientDisconnectListener
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This interface is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Callback that observes when the client disconnects. Use `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient#addClientDisconnectListener(androidx.wear.watchface.client.InteractiveWatchFaceClient.ClientDisconnectListener,java.util.concurrent.Executor)` to register a ClientDisconnectListener.

## Summary

| ### Public methods |
|---|---|
| `default void` | `[onClientDisconnected](https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient.ClientDisconnectListener#onClientDisconnected())()` **This method is deprecated.** Deprecated, use an overload that passes the disconnectReason |
| `default void` | `[onClientDisconnected](https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient.ClientDisconnectListener#onClientDisconnected(kotlin.Int))(int disconnectReason)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public methods

### onClientDisconnected

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0)

```
default void [onClientDisconnected](https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient.ClientDisconnectListener#onClientDisconnected())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated, use an overload that passes the disconnectReason, use this instead:
>
> ```
> onClientDisconnected(Int)
> ```

The client disconnected, typically due to the server side crashing. Note this is not called in response to `https://developer.android.com/reference/java/lang/AutoCloseable.html#close()` being called on `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient`.

### onClientDisconnected

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
default void [onClientDisconnected](https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient.ClientDisconnectListener#onClientDisconnected(kotlin.Int))(int disconnectReason)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The client disconnected, due to `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient.ClientDisconnectListener#onClientDisconnected(kotlin.Int)`.