# WatchFaceControlClient

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/WatchFaceControlClient.kt+class:androidx.wear.watchface.client.WatchFaceControlClient) 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)

*** ** * ** ***


```
interface WatchFaceControlClient : AutoCloseable
```

<br />

Known direct subclasses [ListenableWatchFaceControlClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/ListenableWatchFaceControlClient)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/ListenableWatchFaceControlClient` | **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

*** ** * ** ***

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

Connects to a watch face's WatchFaceControlService which allows the user to control the watch face.

use Watch Face Format instead

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient.ServiceNotBoundException : https://developer.android.com/reference/java/lang/Exception.html` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `class https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient.ServiceStartFailureException : https://developer.android.com/reference/java/lang/Exception.html` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public companion functions |
|---|---|
| `suspend https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient` | `[createWatchFaceControlClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#createWatchFaceControlClient(android.content.Context,kotlin.String))( context: https://developer.android.com/reference/android/content/Context.html, watchFacePackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `suspend https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient` | `[createWatchFaceRuntimeControlClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#createWatchFaceRuntimeControlClient(android.content.Context,kotlin.String,kotlin.String))( context: https://developer.android.com/reference/android/content/Context.html, runtimePackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, resourceOnlyWatchFacePackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient?` | `[createHeadlessWatchFaceClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#createHeadlessWatchFaceClient(android.content.ComponentName,androidx.wear.watchface.client.DeviceConfig,kotlin.Int,kotlin.Int))( watchFaceName: https://developer.android.com/reference/android/content/ComponentName.html, deviceConfig: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig, surfaceWidth: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, surfaceHeight: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` **This function is deprecated.** Creating a headless client without a watchface ID is deprecated |
| `open https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient?` | `[createHeadlessWatchFaceClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#createHeadlessWatchFaceClient(kotlin.String,android.content.ComponentName,androidx.wear.watchface.client.DeviceConfig,kotlin.Int,kotlin.Int))( id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, watchFaceName: https://developer.android.com/reference/android/content/ComponentName.html, deviceConfig: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig, surfaceWidth: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, surfaceHeight: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DefaultComplicationDataSourcePolicyAndType>` | `[getDefaultComplicationDataSourcePoliciesAndType](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName))( watchFaceName: https://developer.android.com/reference/android/content/ComponentName.html )` **This function is deprecated.** Use the WatchFaceMetadataClient instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/EditorServiceClient` | `[getEditorServiceClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#getEditorServiceClient())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient?` | `[getInteractiveWatchFaceClientInstance](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#getInteractiveWatchFaceClientInstance(kotlin.String))(instanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `suspend https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient` | `[getOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/kotlin/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))( id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, deviceConfig: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig, watchUiState: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchUiState, userStyle: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData?, slotIdToComplicationData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData>? )` **This function is deprecated.** Use an overload that specifies Consumer\<String\> |
| `open suspend https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient` | `[getOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/kotlin/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))( instanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, deviceConfig: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig, watchUiState: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchUiState, userStyle: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData?, slotIdToComplicationData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData>?, previewImageUpdateRequestedExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html, previewImageUpdateRequestedListener: https://developer.android.com/reference/kotlin/androidx/core/util/Consumer<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html> )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `[hasComplicationDataCache](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#hasComplicationDataCache())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

### Inherited functions

From [java.lang.AutoCloseable](https://developer.android.com/reference/java/lang/AutoCloseable.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[close](https://developer.android.com/reference/java/lang/AutoCloseable.html#close())()`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.

## Public companion functions

### createWatchFaceControlClient

```
suspend fun [createWatchFaceControlClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#createWatchFaceControlClient(android.content.Context,kotlin.String))(
    context: Context,
    watchFacePackageName: String
): WatchFaceControlClient
```

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

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

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | Calling application's `https://developer.android.com/reference/android/content/Context.html`. |
| `watchFacePackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The name of the package containing the watch face control service to bind to. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient` if there is one. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient.ServiceNotBoundException` | if the watch face control service can not be bound or a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient.ServiceStartFailureException` if the watch face dies during startup. |

### createWatchFaceRuntimeControlClient

```
suspend fun [createWatchFaceRuntimeControlClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#createWatchFaceRuntimeControlClient(android.content.Context,kotlin.String,kotlin.String))(
    context: Context,
    runtimePackageName: String,
    resourceOnlyWatchFacePackageName: String
): WatchFaceControlClient
```

> [!CAUTION]
> **This function 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/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#createWatchFaceControlClient(android.content.Context,kotlin.String)` this constructs a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient` which attempts to connect to the watch face runtime in the android package `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient.Companion#createWatchFaceRuntimeControlClient(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/kotlin/androidx/wear/watchface/client/WatchFaceControlClient.Companion#createWatchFaceRuntimeControlClient(android.content.Context,kotlin.String,kotlin.String)`.

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 |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | Calling application's `https://developer.android.com/reference/android/content/Context.html`. |
| `runtimePackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The name of the package containing the watch face runtime's control service to bind to. |
| `resourceOnlyWatchFacePackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The name of the package from which to load the resource only watch face. This is exposed to the runtime via WatchFaceService.resourceOnlyWatchFacePackageName. Note only one watch face definition per resource only watch face package is supported. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient` if there is one. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient.ServiceNotBoundException` | if the watch face control service can not be bound or a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient.ServiceStartFailureException` if the watch face dies during startup. |

## Public functions

### 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)

```
fun [createHeadlessWatchFaceClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#createHeadlessWatchFaceClient(android.content.ComponentName,androidx.wear.watchface.client.DeviceConfig,kotlin.Int,kotlin.Int))(
    watchFaceName: ComponentName,
    deviceConfig: DeviceConfig,
    surfaceWidth: @Px Int,
    surfaceHeight: @Px Int
): HeadlessWatchFaceClient?
```

> [!CAUTION]
> **This function is deprecated.**   
> Creating a headless client without a watchface ID is deprecated, use this instead:
>
> ```kotlin
> [createHeadlessWatchFaceClient(String, ComponentName, DeviceConfig, Int, Int)]
> ```

Creates a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient` with the specified `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig`. Screenshots made with `https://developer.android.com/reference/kotlin/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 |
|---|---|
| `watchFaceName: https://developer.android.com/reference/android/content/ComponentName.html` | 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. |
| `deviceConfig: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig` | The hardware `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig` |
| `surfaceWidth: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The width of screen shots taken by the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient` |
| `surfaceHeight: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The height of screen shots taken by the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient` |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient?` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient` or `null` if `https://developer.android.com/reference/kotlin/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)

```
open fun [createHeadlessWatchFaceClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#createHeadlessWatchFaceClient(kotlin.String,android.content.ComponentName,androidx.wear.watchface.client.DeviceConfig,kotlin.Int,kotlin.Int))(
    id: String,
    watchFaceName: ComponentName,
    deviceConfig: DeviceConfig,
    surfaceWidth: @Px Int,
    surfaceHeight: @Px Int
): HeadlessWatchFaceClient?
```

> [!CAUTION]
> **This function 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/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient` with the specified `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig`. Screenshots made with `https://developer.android.com/reference/kotlin/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 |
|---|---|
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The ID for the requested `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient`, will be exposed to the watch face via `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchState#watchFaceInstanceId()`. |
| `watchFaceName: https://developer.android.com/reference/android/content/ComponentName.html` | 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. |
| `deviceConfig: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig` | The hardware `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig` |
| `surfaceWidth: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The width of screen shots taken by the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient` |
| `surfaceHeight: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The height of screen shots taken by the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient` |

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

### 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)

```
fun [getDefaultComplicationDataSourcePoliciesAndType](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#getDefaultComplicationDataSourcePoliciesAndType(android.content.ComponentName))(
    watchFaceName: ComponentName
): Map<Int, DefaultComplicationDataSourcePolicyAndType>
```

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

Returns a map of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot` id to the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DefaultComplicationDataSourcePolicyAndType` for each `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot` in the watchface corresponding to `https://developer.android.com/reference/kotlin/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 |
|---|---|
| `watchFaceName: https://developer.android.com/reference/android/content/ComponentName.html` | The `https://developer.android.com/reference/android/content/ComponentName.html` of the watch face to obtain the map of `https://developer.android.com/reference/kotlin/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)

```
fun [getEditorServiceClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#getEditorServiceClient())(): EditorServiceClient
```

> [!CAUTION]
> **This function 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)

```
fun [getInteractiveWatchFaceClientInstance](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#getInteractiveWatchFaceClientInstance(kotlin.String))(instanceId: String): InteractiveWatchFaceClient?
```

> [!CAUTION]
> **This function 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/kotlin/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 |
|---|---|
| `instanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The name of the interactive watch face instance to retrieve |

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

### getOrCreateInteractiveWatchFaceClient

```
suspend fun [getOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/kotlin/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))(
    id: String,
    deviceConfig: DeviceConfig,
    watchUiState: WatchUiState,
    userStyle: UserStyleData?,
    slotIdToComplicationData: Map<Int, ComplicationData>?
): InteractiveWatchFaceClient
```

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

Requests either an existing `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient` with the specified `https://developer.android.com/reference/kotlin/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/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient` for the next time the WallpaperService creates an engine.

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

| Parameters |
|---|---|
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The ID for the requested `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient`, will be exposed to the watch face via `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchState#watchFaceInstanceId()`. |
| `deviceConfig: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig` for the wearable. |
| `watchUiState: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchUiState` | The initial `https://developer.android.com/reference/kotlin/androidx/wear/watchface/data/WatchUiState` for the wearable. |
| `userStyle: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData?` | Optional `https://developer.android.com/reference/kotlin/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/kotlin/androidx/wear/watchface/style/UserStyleSchema`'s default). |
| `slotIdToComplicationData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData>?` | The initial `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot` data, or `null` if unavailable. |

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

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

### getOrCreateInteractiveWatchFaceClient

```
open suspend fun [getOrCreateInteractiveWatchFaceClient](https://developer.android.com/reference/kotlin/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))(
    instanceId: String,
    deviceConfig: DeviceConfig,
    watchUiState: WatchUiState,
    userStyle: UserStyleData?,
    slotIdToComplicationData: Map<Int, ComplicationData>?,
    previewImageUpdateRequestedExecutor: Executor,
    previewImageUpdateRequestedListener: Consumer<String>
): InteractiveWatchFaceClient
```

> [!CAUTION]
> **This function 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/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient` with the specified `https://developer.android.com/reference/kotlin/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/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient` for the next time the WallpaperService creates an engine.

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

| Parameters |
|---|---|
| `instanceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The ID for the requested `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient`, will be exposed to the watch face via `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchState#watchFaceInstanceId()`. |
| `deviceConfig: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig` for the wearable. |
| `watchUiState: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchUiState` | The initial `https://developer.android.com/reference/kotlin/androidx/wear/watchface/data/WatchUiState` for the wearable. |
| `userStyle: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData?` | Optional `https://developer.android.com/reference/kotlin/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/kotlin/androidx/wear/watchface/style/UserStyleSchema`'s default). |
| `slotIdToComplicationData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData>?` | The initial `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot` data, or `null` if unavailable. |
| `previewImageUpdateRequestedExecutor: https://developer.android.com/reference/java/util/concurrent/Executor.html` | The `https://developer.android.com/reference/java/util/concurrent/Executor.html` on which to run `https://developer.android.com/reference/kotlin/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/kotlin/androidx/wear/watchface/Renderer#sendPreviewImageNeedsUpdateRequest()`. |
| `previewImageUpdateRequestedListener: https://developer.android.com/reference/kotlin/androidx/core/util/Consumer<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | The `https://developer.android.com/reference/kotlin/androidx/core/util/Consumer` fires when the watch face calls `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#sendPreviewImageNeedsUpdateRequest()`, indicating that it now looks visually different. The string passed to the `https://developer.android.com/reference/kotlin/androidx/core/util/Consumer` is the ID of the watch face (see `https://developer.android.com/reference/kotlin/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/kotlin/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/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient#updateWatchFaceInstance(kotlin.String,androidx.wear.watchface.style.UserStyle)` is called shortly after `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#sendPreviewImageNeedsUpdateRequest()`. The `https://developer.android.com/reference/kotlin/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/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/InteractiveWatchFaceClient`, this should be closed when finished. |

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

### hasComplicationDataCache

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)

```
open fun [hasComplicationDataCache](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceControlClient#hasComplicationDataCache())(): Boolean
```

> [!CAUTION]
> **This function 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/kotlin/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.