# ListenableWatchFaceControlClient

Artifact: [androidx.wear.watchface:watchface-client-guava](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/client/ListenableWatchFaceControlClient.kt+class:androidx.wear.watchface.client.ListenableWatchFaceControlClient) 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 class ListenableWatchFaceControlClient implements WatchFaceControlClient
```

<br />

*** ** * ** ***

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

`https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html`-based compatibility wrapper around `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient`'s suspending methods. This class is open to allow mocking.

use Watch Face Format instead

## Summary

| ### Public constructors |
|---|
| `[ListenableWatchFaceControlClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#ListenableWatchFaceControlClient(androidx.wear.watchface.client.WatchFaceControlClient))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient watchFaceControlClient )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `void` | `[close](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#close())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` | `[createHeadlessWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#createHeadlessWatchFaceClient(android.content.ComponentName,androidx.wear.watchface.client.DeviceConfig,kotlin.Int,kotlin.Int))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html watchFaceName, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig, int surfaceWidth, int surfaceHeight )` **This method is deprecated.** createHeadlessWatchFaceClient without an id is deprecated |
| `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` | `[createHeadlessWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#createHeadlessWatchFaceClient(kotlin.String,android.content.ComponentName,androidx.wear.watchface.client.DeviceConfig,kotlin.Int,kotlin.Int))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html watchFaceName, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig, int surfaceWidth, int surfaceHeight )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient>` | `[createWatchFaceControlClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#createWatchFaceControlClient(android.content.Context,kotlin.String))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html watchFacePackageName )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient>` | `[createWatchFaceRuntimeControlClientAsync](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#createWatchFaceRuntimeControlClientAsync(android.content.Context,kotlin.String,kotlin.String))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html runtimePackageName, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html resourceOnlyWatchFacePackageName )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DefaultComplicationDataSourcePolicyAndType>` | `[getDefaultComplicationDataSourcePoliciesAndType](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html watchFaceName )` **This method is deprecated.** Use the WatchFaceMetadataClient instead. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/EditorServiceClient` | `[getEditorServiceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getEditorServiceClient())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` | `[getInteractiveWatchFaceClientInstance](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getInteractiveWatchFaceClientInstance(kotlin.String))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html instanceId)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` | `[getOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchUiState watchUiState, https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData userStyle, https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData> slotIdToComplicationData )` **This method is deprecated.** Use an overload that specifies a Consumer\<String\> |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` | `[getOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map,java.util.concurrent.Executor,androidx.core.util.Consumer))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html instanceId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchUiState watchUiState, https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData userStyle, https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData> slotIdToComplicationData, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html previewImageUpdateRequestedExecutor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> previewImageUpdateRequestedListener )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `boolean` | `[hasComplicationDataCache](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#hasComplicationDataCache())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient>` | `[listenableGetOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#listenableGetOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchUiState watchUiState, https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData userStyle, https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData> slotIdToComplicationData )` **This method is deprecated.** Use an overload that specifies Consumer\<String\> |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient>` | `[listenableGetOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#listenableGetOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map,java.util.concurrent.Executor,androidx.core.util.Consumer))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchUiState watchUiState, https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData userStyle, https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData> slotIdToComplicationData, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html previewImageUpdateRequestedExecutor, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> previewImageUpdateRequestedListener )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public constructors

### ListenableWatchFaceControlClient

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 [ListenableWatchFaceControlClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#ListenableWatchFaceControlClient(androidx.wear.watchface.client.WatchFaceControlClient))(
    @NonNull WatchFaceControlClient watchFaceControlClient
)
```

> [!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

## Public methods

### close

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 void [close](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#close())()
```

> [!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

### createHeadlessWatchFaceClient

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

```
public HeadlessWatchFaceClient [createHeadlessWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#createHeadlessWatchFaceClient(android.content.ComponentName,androidx.wear.watchface.client.DeviceConfig,kotlin.Int,kotlin.Int))(
    @NonNull ComponentName watchFaceName,
    @NonNull DeviceConfig deviceConfig,
    int surfaceWidth,
    int surfaceHeight
)
```

> [!CAUTION]
> **This method is deprecated.**   
> createHeadlessWatchFaceClient without an id is deprecated

Creates a `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` with the specified `https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig`. Screenshots made with `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient#renderWatchFaceToBitmap(androidx.wear.watchface.RenderParameters,java.time.Instant,androidx.wear.watchface.style.UserStyle,kotlin.collections.Map)` will be `surfaceWidth` x `surfaceHeight` in size.

When finished call `https://developer.android.com/reference/java/lang/AutoCloseable.html#close()` to release resources.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html watchFaceName` | The `https://developer.android.com/reference/android/content/ComponentName.html` of the watch face to create a headless instance for must be in the same APK the WatchFaceControlClient is connected to. NB a single apk can contain multiple watch faces. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig` | The hardware `https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig` |
| `int surfaceWidth` | The width of screen shots taken by the `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` |
| `int surfaceHeight` | The height of screen shots taken by the `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` | The `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` or `null` if `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#createHeadlessWatchFaceClient(android.content.ComponentName,androidx.wear.watchface.client.DeviceConfig,kotlin.Int,kotlin.Int)` is unrecognized. |

### createHeadlessWatchFaceClient

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

```
public HeadlessWatchFaceClient [createHeadlessWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#createHeadlessWatchFaceClient(kotlin.String,android.content.ComponentName,androidx.wear.watchface.client.DeviceConfig,kotlin.Int,kotlin.Int))(
    @NonNull String id,
    @NonNull ComponentName watchFaceName,
    @NonNull DeviceConfig deviceConfig,
    int surfaceWidth,
    int surfaceHeight
)
```

> [!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

Creates a `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` with the specified `https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig`. Screenshots made with `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient#renderWatchFaceToBitmap(androidx.wear.watchface.RenderParameters,java.time.Instant,androidx.wear.watchface.style.UserStyle,kotlin.collections.Map)` will be `surfaceWidth` x `surfaceHeight` in size.

When finished call `https://developer.android.com/reference/java/lang/AutoCloseable.html#close()` to release resources.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id` | The ID for the requested `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient`, will be exposed to the watch face via `https://developer.android.com/reference/androidx/wear/watchface/WatchState#watchFaceInstanceId()`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html watchFaceName` | The `https://developer.android.com/reference/android/content/ComponentName.html` of the watch face to create a headless instance for must be in the same APK the WatchFaceControlClient is connected to. NB a single apk can contain multiple watch faces. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig` | The hardware `https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig` |
| `int surfaceWidth` | The width of screen shots taken by the `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` |
| `int surfaceHeight` | The height of screen shots taken by the `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` | The `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` or `null` if `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#createHeadlessWatchFaceClient(kotlin.String,android.content.ComponentName,androidx.wear.watchface.client.DeviceConfig,kotlin.Int,kotlin.Int)` is unrecognized. |

### createWatchFaceControlClient

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 static final @NonNull ListenableFuture<@NonNull ListenableWatchFaceControlClient> [createWatchFaceControlClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#createWatchFaceControlClient(android.content.Context,kotlin.String))(
    @NonNull Context context,
    @NonNull String watchFacePackageName
)
```

> [!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

Returns a `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` for a `https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient` which attempts to connect to a watch face in the android package `https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient.Companion#createWatchFaceControlClient(android.content.Context,kotlin.String)`. Resolves as `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient.ServiceNotBoundException` if the watch face control service can not be bound.

Note the returned future may resolve immediately on the calling thread or it may resolve asynchronously when the service is connected on a background thread.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context` | Calling application's `https://developer.android.com/reference/android/content/Context.html`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html watchFacePackageName` | Name of the package containing the watch face control service to bind to. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient>` | `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html`\<`https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient`\> which on success resolves to a `https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient` or throws a `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient.ServiceNotBoundException` if the watch face control service can not be bound. |

### createWatchFaceRuntimeControlClientAsync

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)

```
public static final @NonNull ListenableFuture<@NonNull ListenableWatchFaceControlClient> [createWatchFaceRuntimeControlClientAsync](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#createWatchFaceRuntimeControlClientAsync(android.content.Context,kotlin.String,kotlin.String))(
    @NonNull Context context,
    @NonNull String runtimePackageName,
    @NonNull String resourceOnlyWatchFacePackageName
)
```

> [!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

Similar `https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#createWatchFaceControlClient(android.content.Context,kotlin.String)` this constructs a `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient` which attempts to connect to the watch face runtime in the android package `https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient.Companion#createWatchFaceRuntimeControlClientAsync(android.content.Context,kotlin.String,kotlin.String)`.

A watch face runtime is a special type of watch face, which renders a watch face described by resources in another package `https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient.Companion#createWatchFaceRuntimeControlClientAsync(android.content.Context,kotlin.String,kotlin.String)`.

Note only one watch face definition per resource only watch face package is supported.

Currently Wear OS only supports the runtime for the Android Watch Face Format (see https://developer.android.com/training/wearables/wff for more details).

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context` | Calling application's `https://developer.android.com/reference/android/content/Context.html`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html runtimePackageName` | The name of the package containing the watch face runtime's control service to bind to. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html resourceOnlyWatchFacePackageName` | The name of the package from which to load the resource only watch face. This is exposed to the runtime via the `resourceOnlyWatchFacePackageName` parameter passed to `https://developer.android.com/reference/androidx/wear/watchface/WatchFaceRuntimeService#createUserStyleSchema(kotlin.String)`, `https://developer.android.com/reference/androidx/wear/watchface/WatchFaceRuntimeService#createComplicationSlotsManager(androidx.wear.watchface.style.CurrentUserStyleRepository,kotlin.String)`, `https://developer.android.com/reference/androidx/wear/watchface/WatchFaceRuntimeService#createUserStyleFlavors(androidx.wear.watchface.style.CurrentUserStyleRepository,androidx.wear.watchface.ComplicationSlotsManager,kotlin.String)` and `https://developer.android.com/reference/androidx/wear/watchface/WatchFaceRuntimeService#createWatchFace(android.view.SurfaceHolder,androidx.wear.watchface.WatchState,androidx.wear.watchface.ComplicationSlotsManager,androidx.wear.watchface.style.CurrentUserStyleRepository,kotlin.String)`). |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient>` | `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html`\<`https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient`\> which on success resolves to a `https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient` or throws a `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient.ServiceNotBoundException` if the watch face control service can not be bound. |

### getDefaultComplicationDataSourcePoliciesAndType

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

```
public @NonNull Map<@NonNull Integer, @NonNull DefaultComplicationDataSourcePolicyAndType> [getDefaultComplicationDataSourcePoliciesAndType](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName))(
    @NonNull ComponentName watchFaceName
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Use the WatchFaceMetadataClient instead.

Returns a map of `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` id to the `https://developer.android.com/reference/androidx/wear/watchface/client/DefaultComplicationDataSourcePolicyAndType` for each `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` in the watchface corresponding to `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName)`. Where possible a fast path is used that doesn't need to fully construct the corresponding watch face.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/ComponentName.html watchFaceName` | The `https://developer.android.com/reference/android/content/ComponentName.html` of the watch face to obtain the map of `https://developer.android.com/reference/androidx/wear/watchface/client/DefaultComplicationDataSourcePolicyAndType`s for. It must be in the same APK the WatchFaceControlClient is connected to. NB a single apk can contain multiple watch faces. |

### getEditorServiceClient

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 @NonNull EditorServiceClient [getEditorServiceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getEditorServiceClient())()
```

> [!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

### getInteractiveWatchFaceClientInstance

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 InteractiveWatchFaceClient [getInteractiveWatchFaceClientInstance](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getInteractiveWatchFaceClientInstance(kotlin.String))(@NonNull String instanceId)
```

> [!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

Returns the `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` for the given instance id, or null if no such instance exists.

When finished call `https://developer.android.com/reference/java/lang/AutoCloseable.html#close()` to release resources.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html instanceId` | The name of the interactive watch face instance to retrieve |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` | The `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` or `null` if `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#getInteractiveWatchFaceClientInstance(kotlin.String)` is unrecognized, or `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient.ServiceNotBoundException` if the WatchFaceControlService is not bound. |

### getOrCreateInteractiveWatchFaceClient

```
public @NonNull InteractiveWatchFaceClient [getOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map))(
    @NonNull String id,
    @NonNull DeviceConfig deviceConfig,
    @NonNull WatchUiState watchUiState,
    UserStyleData userStyle,
    Map<@NonNull Integer, @NonNull ComplicationData> slotIdToComplicationData
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Use an overload that specifies a Consumer\<String\>, use this instead:
>
> ```
> getOrCreateInteractiveWatchFaceClient(String, DeviceConfig, WatchUiState, UserStyleData?, Map<Int, ComplicationData>?, Executor, Consumer<String>)
> ```

Requests either an existing `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` with the specified `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map)` or schedules creation of an `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` for the next time the WallpaperService creates an engine.

NOTE that currently only one `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` per process can exist at a time.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id` | The ID for the requested `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient`, will be exposed to the watch face via `https://developer.android.com/reference/androidx/wear/watchface/WatchState#watchFaceInstanceId()`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig` | The `https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig` for the wearable. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchUiState watchUiState` | The initial `https://developer.android.com/reference/androidx/wear/watchface/data/WatchUiState` for the wearable. |
| `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData userStyle` | Optional `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData` to apply to the instance (whether or not it's created). If `null` then the pre-existing user style is preserved (if the instance is created this will be the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSchema`'s default). |
| `https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData> slotIdToComplicationData` | The initial `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` data, or `null` if unavailable. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` | The `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient`, this should be closed when finished. |

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient.ServiceStartFailureException` | if the watchface dies during startup. |

### getOrCreateInteractiveWatchFaceClient

```
public @NonNull InteractiveWatchFaceClient [getOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map,java.util.concurrent.Executor,androidx.core.util.Consumer))(
    @NonNull String instanceId,
    @NonNull DeviceConfig deviceConfig,
    @NonNull WatchUiState watchUiState,
    UserStyleData userStyle,
    Map<@NonNull Integer, @NonNull ComplicationData> slotIdToComplicationData,
    @NonNull Executor previewImageUpdateRequestedExecutor,
    @NonNull Consumer<@NonNull String> previewImageUpdateRequestedListener
)
```

> [!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

Requests either an existing `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` with the specified `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map,java.util.concurrent.Executor,androidx.core.util.Consumer)` or schedules creation of an `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` for the next time the WallpaperService creates an engine.

NOTE that currently only one `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` per process can exist at a time.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html instanceId` | The ID for the requested `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient`, will be exposed to the watch face via `https://developer.android.com/reference/androidx/wear/watchface/WatchState#watchFaceInstanceId()`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig` | The `https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig` for the wearable. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchUiState watchUiState` | The initial `https://developer.android.com/reference/androidx/wear/watchface/data/WatchUiState` for the wearable. |
| `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData userStyle` | Optional `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData` to apply to the instance (whether or not it's created). If `null` then the pre-existing user style is preserved (if the instance is created this will be the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSchema`'s default). |
| `https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData> slotIdToComplicationData` | The initial `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` data, or `null` if unavailable. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html previewImageUpdateRequestedExecutor` | The `https://developer.android.com/reference/java/util/concurrent/Executor.html` on which to run `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map,java.util.concurrent.Executor,androidx.core.util.Consumer)` if the watch face calls `https://developer.android.com/reference/androidx/wear/watchface/Renderer#sendPreviewImageNeedsUpdateRequest()`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> previewImageUpdateRequestedListener` | The `https://developer.android.com/reference/androidx/core/util/Consumer` fires when the watch face calls `https://developer.android.com/reference/androidx/wear/watchface/Renderer#sendPreviewImageNeedsUpdateRequest()`, indicating that it now looks visually different. The string passed to the `https://developer.android.com/reference/androidx/core/util/Consumer` is the ID of the watch face (see `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map,java.util.concurrent.Executor,androidx.core.util.Consumer)` passed into `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map,java.util.concurrent.Executor,androidx.core.util.Consumer)`) requesting the update. This will usually match the current watch face but it could also be from a previous watch face if `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient#updateWatchFaceInstance(kotlin.String,androidx.wear.watchface.style.UserStyle)` is called shortly after `https://developer.android.com/reference/androidx/wear/watchface/Renderer#sendPreviewImageNeedsUpdateRequest()`. The `https://developer.android.com/reference/androidx/core/util/Consumer` should Schedule creation of a headless instance to render a new preview image for the instanceId. This is likely an expensive operation and should be rate limited. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` | The `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient`, this should be closed when finished. |

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient.ServiceStartFailureException` | if the watchface dies during startup. |

### hasComplicationDataCache

```
public boolean [hasComplicationDataCache](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#hasComplicationDataCache())()
```

> [!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

Whether or not the watch face has a `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData` cache. Based on this the system may wish to adopt a different strategy for sending complication data. E.g. sending initial blank complications before fetching the real ones is not necessary.

### listenableGetOrCreateInteractiveWatchFaceClient

```
public @NonNull ListenableFuture<@NonNull InteractiveWatchFaceClient> [listenableGetOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#listenableGetOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map))(
    @NonNull String id,
    @NonNull DeviceConfig deviceConfig,
    @NonNull WatchUiState watchUiState,
    UserStyleData userStyle,
    Map<@NonNull Integer, @NonNull ComplicationData> slotIdToComplicationData
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Use an overload that specifies Consumer\<String\>, use this instead:
>
> ```
> listenableGetOrCreateInteractiveWatchFaceClient(String, DeviceConfig, WatchUiState, UserStyleData?, Map<Int, ComplicationData>?, Executor, Consumer<String>)
> ```

`https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` wrapper around `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map)`. This is open to allow mocking.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id` | The Id of the interactive instance to get or create. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig` | The `https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig` of the interactive instance (only used when creating) |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchUiState watchUiState` | The initial `https://developer.android.com/reference/androidx/wear/watchface/client/WatchUiState` for the wearable. |
| `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData userStyle` | Optional `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData` to apply to the instance (whether or not it's created). If `null` then the pre-existing user style is preserved (if the instance is created this will be the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSchema`'s default). |
| `https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData> slotIdToComplicationData` | The initial `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` data, or `null` if unavailable. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient>` | a `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` for the `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient`. |

### listenableGetOrCreateInteractiveWatchFaceClient

```
public @NonNull ListenableFuture<@NonNull InteractiveWatchFaceClient> [listenableGetOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#listenableGetOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map,java.util.concurrent.Executor,androidx.core.util.Consumer))(
    @NonNull String id,
    @NonNull DeviceConfig deviceConfig,
    @NonNull WatchUiState watchUiState,
    UserStyleData userStyle,
    Map<@NonNull Integer, @NonNull ComplicationData> slotIdToComplicationData,
    @NonNull Executor previewImageUpdateRequestedExecutor,
    @NonNull Consumer<@NonNull String> previewImageUpdateRequestedListener
)
```

> [!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

`https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` wrapper around `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map)`. This is open to allow mocking.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html id` | The Id of the interactive instance to get or create. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig deviceConfig` | The `https://developer.android.com/reference/androidx/wear/watchface/client/DeviceConfig` of the interactive instance (only used when creating) |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchUiState watchUiState` | The initial `https://developer.android.com/reference/androidx/wear/watchface/client/WatchUiState` for the wearable. |
| `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData userStyle` | Optional `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleData` to apply to the instance (whether or not it's created). If `null` then the pre-existing user style is preserved (if the instance is created this will be the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSchema`'s default). |
| `https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationData> slotIdToComplicationData` | The initial `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` data, or `null` if unavailable. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/concurrent/Executor.html previewImageUpdateRequestedExecutor` | The `https://developer.android.com/reference/java/util/concurrent/Executor.html` on which to run `https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#listenableGetOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map,java.util.concurrent.Executor,androidx.core.util.Consumer)` if the watch face calls `https://developer.android.com/reference/androidx/wear/watchface/Renderer#sendPreviewImageNeedsUpdateRequest()`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/Consumer<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> previewImageUpdateRequestedListener` | The `https://developer.android.com/reference/androidx/core/util/Consumer` fires when the watch face calls `https://developer.android.com/reference/androidx/wear/watchface/Renderer#sendPreviewImageNeedsUpdateRequest()`, indicating that it now looks visually different. The string passed to the `https://developer.android.com/reference/androidx/core/util/Consumer` is the ID of the watch face (see `https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#listenableGetOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map,java.util.concurrent.Executor,androidx.core.util.Consumer)` passed into `https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceControlClient#getOrCreateInteractiveWatchFaceClient(kotlin.String,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.client.WatchUiState,androidx.wear.watchface.style.UserStyleData,kotlin.collections.Map)`) requesting the update. This will usually match the current watch face but it could also be from a previous watch face if `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient#updateWatchFaceInstance(kotlin.String,androidx.wear.watchface.style.UserStyle)` is called shortly after `https://developer.android.com/reference/androidx/wear/watchface/Renderer#sendPreviewImageNeedsUpdateRequest()`. The `https://developer.android.com/reference/androidx/core/util/Consumer` should Schedule creation of a headless instance to render a new preview image for the instanceId. This is likely an expensive operation and should be rate limited. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient>` | a `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` for the `https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient`. |