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

*** ** * ** ***


```
public interface WatchFaceControlClient extends AutoCloseable
```

<br />

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

|---|---|
| `https://developer.android.com/reference/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 |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient.ServiceNotBoundException extends https://developer.android.com/reference/java/lang/Exception.html` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `public final class https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient.ServiceStartFailureException extends https://developer.android.com/reference/java/lang/Exception.html` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `abstract https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` | `[createHeadlessWatchFaceClient](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#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, @https://developer.android.com/reference/androidx/annotation/Px int surfaceWidth, @https://developer.android.com/reference/androidx/annotation/Px int surfaceHeight )` **This method is deprecated.** Creating a headless client without a watchface ID is deprecated |
| `default https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` | `[createHeadlessWatchFaceClient](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))( @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, @https://developer.android.com/reference/androidx/annotation/Px int surfaceWidth, @https://developer.android.com/reference/androidx/annotation/Px int surfaceHeight )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `default static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient` | `[createWatchFaceControlClient](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#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. |
| `default static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient` | `[createWatchFaceRuntimeControlClient](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#createWatchFaceRuntimeControlClient(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. |
| `abstract @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/WatchFaceControlClient#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. |
| `abstract @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/WatchFaceControlClient#getEditorServiceClient())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `abstract https://developer.android.com/reference/androidx/wear/watchface/client/InteractiveWatchFaceClient` | `[getInteractiveWatchFaceClientInstance](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#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. |
| `abstract @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/WatchFaceControlClient#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 Consumer\<String\> |
| `default @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/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))( @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. |
| `default boolean` | `[hasComplicationDataCache](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#hasComplicationDataCache())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

### Inherited methods

From [java.lang.AutoCloseable](https://developer.android.com/reference/java/lang/AutoCloseable.html) `abstract void` `[close](https://developer.android.com/reference/java/lang/AutoCloseable.html#close())()`

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

## Public methods

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

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

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

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` |
| `@https://developer.android.com/reference/androidx/annotation/Px int surfaceWidth` | The width of screen shots taken by the `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` |
| `@https://developer.android.com/reference/androidx/annotation/Px 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)

```
default HeadlessWatchFaceClient [createHeadlessWatchFaceClient](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))(
    @NonNull String id,
    @NonNull ComponentName watchFaceName,
    @NonNull DeviceConfig deviceConfig,
    @Px int surfaceWidth,
    @Px 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` |
| `@https://developer.android.com/reference/androidx/annotation/Px int surfaceWidth` | The width of screen shots taken by the `https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient` |
| `@https://developer.android.com/reference/androidx/annotation/Px 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

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

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

| 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` | The name of the package containing the watch face control service to bind to. |

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

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

### createWatchFaceRuntimeControlClient

```
default static final @NonNull WatchFaceControlClient [createWatchFaceRuntimeControlClient](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#createWatchFaceRuntimeControlClient(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/WatchFaceControlClient#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/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/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 |
|---|---|
| `@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 WatchFaceService.resourceOnlyWatchFacePackageName. Note only one watch face definition per resource only watch face package is supported. |

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

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

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

```
abstract @NonNull Map<@NonNull Integer, @NonNull DefaultComplicationDataSourcePolicyAndType> [getDefaultComplicationDataSourcePoliciesAndType](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#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)

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

```
abstract InteractiveWatchFaceClient [getInteractiveWatchFaceClientInstance](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#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

```
abstract @NonNull InteractiveWatchFaceClient [getOrCreateInteractiveWatchFaceClient](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))(
    @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:
>
> ```
> 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

```
default @NonNull InteractiveWatchFaceClient [getOrCreateInteractiveWatchFaceClient](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))(
    @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

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)

```
default boolean [hasComplicationDataCache](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceControlClient#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.