# HeadlessWatchFaceClient

# HeadlessWatchFaceClient

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

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/wear/watchface/client/HeadlessWatchFaceClient "View this page in Java")


```
interface HeadlessWatchFaceClient : AutoCloseable
```

<br />

*** ** * ** ***

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

Controls a stateless remote headless watch face. This is mostly intended for use by watch face editor UIs which need to generate screenshots for various styling configurations without affecting the current watchface.

Note clients should call [close](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#close()) when finished.

use Watch Face Format instead

## Summary

|                                                                                                                                               ### Nested types                                                                                                                                               |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `interface `[HeadlessWatchFaceClient.ClientDisconnectListener](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient.ClientDisconnectListener) **This interface is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

|                                                  ### Public companion functions                                                  |
|----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [HeadlessWatchFaceClient](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient) | ~~[createFromBundle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#createFromBundle(android.os.Bundle))~~`(bundle: `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

|                                                   ### Public functions                                                   |
|--------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                            | `@`[AnyThread](https://developer.android.com/reference/kotlin/androidx/annotation/AnyThread) ~~[addClientDisconnectListener](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#addClientDisconnectListener(androidx.wear.watchface.client.HeadlessWatchFaceClient.ClientDisconnectListener,java.util.concurrent.Executor))~~`(` ` listener: `[HeadlessWatchFaceClient.ClientDisconnectListener](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient.ClientDisconnectListener)`,` ` executor: `[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html) `)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.                                                                                                                                                                                                                                                                                                                                                                                                            |
| `open `[UserStyleFlavors](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleFlavors) | ~~[getUserStyleFlavors](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#getUserStyleFlavors())~~`()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `open `[ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html)                          | ~~[getUserStyleSchemaDigestHash](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#getUserStyleSchemaDigestHash())~~`()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                      | `@`[AnyThread](https://developer.android.com/reference/kotlin/androidx/annotation/AnyThread) ~~[isConnectionAlive](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#isConnectionAlive())~~`()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                            | `@`[AnyThread](https://developer.android.com/reference/kotlin/androidx/annotation/AnyThread) ~~[removeClientDisconnectListener](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#removeClientDisconnectListener(androidx.wear.watchface.client.HeadlessWatchFaceClient.ClientDisconnectListener))~~`(` ` listener: `[HeadlessWatchFaceClient.ClientDisconnectListener](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient.ClientDisconnectListener) `)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`?`                                        | `@`[RequiresApi](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi)`(value = 27)` ~~[renderComplicationToBitmap](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#renderComplicationToBitmap(kotlin.Int,androidx.wear.watchface.RenderParameters,java.time.Instant,androidx.wear.watchface.complications.data.ComplicationData,androidx.wear.watchface.style.UserStyle))~~`(` ` complicationSlotId: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` renderParameters: `[RenderParameters](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters)`,` ` instant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`,` ` complicationData: `[ComplicationData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData)`,` ` userStyle: `[UserStyle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle)`?` `)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.                        |
| [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)                                           | `@`[RequiresApi](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi)`(value = 27)` ~~[renderWatchFaceToBitmap](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))~~`(` ` renderParameters: `[RenderParameters](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters)`,` ` instant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`,` ` userStyle: `[UserStyle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle)`?,` ` slotIdToComplicationData: `[Map](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html)`<`[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, `[ComplicationData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData)`>?` `)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html)                                                 | ~~[toBundle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#toBundle())~~`()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

|                                                                                                                                          ### Public properties                                                                                                                                           |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Map](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html)`<`[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, `[ComplicationSlotState](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/ComplicationSlotState)`>` | [complicationSlotsState](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#complicationSlotsState()) **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.                           |
| `open `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                                                                                                                               | [isRenderWatchFaceToSurfaceSupported](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#isRenderWatchFaceToSurfaceSupported()) **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| [Instant](https://developer.android.com/reference/java/time/Instant.html)                                                                                                                                                                                                                                | [previewReferenceInstant](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#previewReferenceInstant()) **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.                         |
| [UserStyleSchema](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSchema)                                                                                                                                                                                          | [userStyleSchema](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#userStyleSchema()) **This property 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) |-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](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

### createFromBundle

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 [createFromBundle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#createFromBundle(android.os.Bundle))(bundle: Bundle): HeadlessWatchFaceClient
```
| **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  

## Public functions

### addClientDisconnectListener

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)  

```
@AnyThread
fun [addClientDisconnectListener](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#addClientDisconnectListener(androidx.wear.watchface.client.HeadlessWatchFaceClient.ClientDisconnectListener,java.util.concurrent.Executor))(
    listener: HeadlessWatchFaceClient.ClientDisconnectListener,
    executor: Executor
): Unit
```
| **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

Registers a [ClientDisconnectListener](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient.ClientDisconnectListener).  

### getUserStyleFlavors

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)  

```
open fun [getUserStyleFlavors](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#getUserStyleFlavors())(): UserStyleFlavors
```
| **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 watch face's [UserStyleFlavors](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleFlavors) if any.  

|                                                    Throws                                                     |
|---------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.RuntimeException](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-runtime-exception/index.html) | if the watch face threw an exception while trying to service the request or there was a communication problem with watch face process. |

### getUserStyleSchemaDigestHash

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 [getUserStyleSchemaDigestHash](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#getUserStyleSchemaDigestHash())(): ByteArray
```
| **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

A SHA-1 [MessageDigest](https://developer.android.com/reference/java/security/MessageDigest.html) hash of the [UserStyleSchema](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSchema). Note that for performance reasons where possible the resource id or url for [Icon](https://developer.android.com/reference/android/graphics/drawable/Icon.html)s in the schema are used rather than the image bytes. This means that this hash should be considered insensitive to changes to the contents of icons between APK versions, which the user should account for accordingly.

This gives the same result as calling UserStyleSchema.computeDigestHash on [userStyleSchema](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#userStyleSchema()) but is slightly faster since less data is passed over AIDL.  

### isConnectionAlive

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)  

```
@AnyThread
fun [isConnectionAlive](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#isConnectionAlive())(): Boolean
```
| **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 true if the connection to the server side is alive.  

### removeClientDisconnectListener

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)  

```
@AnyThread
fun [removeClientDisconnectListener](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#removeClientDisconnectListener(androidx.wear.watchface.client.HeadlessWatchFaceClient.ClientDisconnectListener))(
    listener: HeadlessWatchFaceClient.ClientDisconnectListener
): Unit
```
| **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

Removes a [ClientDisconnectListener](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient.ClientDisconnectListener) previously registered by [addClientDisconnectListener](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#addClientDisconnectListener(androidx.wear.watchface.client.HeadlessWatchFaceClient.ClientDisconnectListener,java.util.concurrent.Executor)).  

### renderComplicationToBitmap

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)  

```
@RequiresApi(value = 27)
fun [renderComplicationToBitmap](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#renderComplicationToBitmap(kotlin.Int,androidx.wear.watchface.RenderParameters,java.time.Instant,androidx.wear.watchface.complications.data.ComplicationData,androidx.wear.watchface.style.UserStyle))(
    complicationSlotId: Int,
    renderParameters: RenderParameters,
    instant: Instant,
    complicationData: ComplicationData,
    userStyle: UserStyle?
): Bitmap?
```
| **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

Renders the [androidx.wear.watchface.ComplicationSlot](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot) to a shared memory backed [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html) with the given settings. The complication will be rendered at the same scale as it would be when the watch face is full screen.  

|                                                                     Parameters                                                                     |
|----------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `complicationSlotId: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                  | The id of the complication to render                                                                                                                           |
| `renderParameters: `[RenderParameters](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters)                    | The [RenderParameters](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters) to draw with                                   |
| `instant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)                                                               | The [Instant](https://developer.android.com/reference/java/time/Instant.html) to render with                                                                   |
| `complicationData: `[ComplicationData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData) | the [ComplicationData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData) to render with              |
| `userStyle: `[UserStyle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle)`?`                                | Optional [UserStyle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle) to render with, if null the default style is used |

|                                      Returns                                      |
|-----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`?` | A shared memory backed [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html) containing a screenshot of the watch face with the given settings, or `null` if [complicationSlotId](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#renderComplicationToBitmap(kotlin.Int,androidx.wear.watchface.RenderParameters,java.time.Instant,androidx.wear.watchface.complications.data.ComplicationData,androidx.wear.watchface.style.UserStyle)) is unrecognized. |

### renderWatchFaceToBitmap

```
@RequiresApi(value = 27)
fun [renderWatchFaceToBitmap](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))(
    renderParameters: RenderParameters,
    instant: Instant,
    userStyle: UserStyle?,
    slotIdToComplicationData: Map<Int, ComplicationData>?
): Bitmap
```
| **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

Renders the watchface to a shared memory backed [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html) with the given settings.  

|                                                                                                                                                               Parameters                                                                                                                                                                |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `renderParameters: `[RenderParameters](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters)                                                                                                                                                                                                         | The [RenderParameters](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters) to draw with.                                                                                                                                                                                                                                                                                                                                       |
| `instant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)                                                                                                                                                                                                                                                    | The [Instant](https://developer.android.com/reference/java/time/Instant.html) to render with                                                                                                                                                                                                                                                                                                                                                                        |
| `userStyle: `[UserStyle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle)`?`                                                                                                                                                                                                                     | Optional [UserStyle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle) to render with, if null the default style is used.                                                                                                                                                                                                                                                                                                     |
| `slotIdToComplicationData: `[Map](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html)`<`[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, `[ComplicationData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData)`>?` | Map of [androidx.wear.watchface.ComplicationSlot](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot) ids to [ComplicationData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData) to render with, or if `null` [androidx.wear.watchface.ComplicationSlot](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot) are not rendered. |

|                                    Returns                                     |
|--------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html) | A shared memory backed [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html) containing a screenshot of the watch face with the given settings. |

### toBundle

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 [toBundle](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/HeadlessWatchFaceClient#toBundle())(): Bundle
```
| **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

Stores the underlying connection in a [Bundle](https://developer.android.com/reference/android/os/Bundle.html).  

## Public properties

### complicationSlotsState

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)  

```
val complicationSlotsState: Map<Int, ComplicationSlotState>
```
| **This property is deprecated.**   
| AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Map of [androidx.wear.watchface.ComplicationSlot](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot) ids to [ComplicationSlotState](https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/ComplicationSlotState) for each [ComplicationSlot](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot) registered with the watch face's [ComplicationSlotsManager](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlotsManager). The ComplicationSlotState is based on the initial state of each [androidx.wear.watchface.ComplicationSlot](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot) plus any overrides from the default style's [ComplicationSlotsUserStyleSetting](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting). Because the style can't change, ComplicationSlotState is immutable for a headless watch face.  

### isRenderWatchFaceToSurfaceSupported

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)  

```
open val isRenderWatchFaceToSurfaceSupported: Boolean
```
| **This property 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 supports renderWatchFaceToSurface.  

### previewReferenceInstant

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)  

```
val previewReferenceInstant: Instant
```
| **This property is deprecated.**   
| AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The [Instant](https://developer.android.com/reference/java/time/Instant.html) to use when rendering previews.  

### userStyleSchema

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)  

```
val userStyleSchema: UserStyleSchema
```
| **This property is deprecated.**   
| AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The watch face's [UserStyleSchema](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSchema).