# WatchFaceMetadataClient

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/WatchFaceMetadataClient.kt+class:androidx.wear.watchface.client.WatchFaceMetadataClient) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***


```
public interface WatchFaceMetadataClient extends AutoCloseable
```

<br />

*** ** * ** ***

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

Interface for fetching watch face metadata. E.g. the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSchema` and `https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata`. This must be `https://developer.android.com/reference/java/lang/AutoCloseable.html#close()`d after use to release resources.

use Watch Face Format instead

## Summary

| ### Nested types |
|---|
| `public static class https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient.Companion` **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/WatchFaceMetadataClient.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/WatchFaceMetadataClient.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/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/ComplicationSlotMetadata>` | `[getComplicationSlotMetadataMap](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient#getComplicationSlotMetadataMap())()` **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/style/UserStyleFlavors` | `[getUserStyleFlavors](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient#getUserStyleFlavors())()` **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/style/UserStyleSchema` | `[getUserStyleSchema](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient#getUserStyleSchema())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `abstract boolean` | `[isUserStyleSchemaStatic](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient#isUserStyleSchemaStatic())()` **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

### getComplicationSlotMetadataMap

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)

```
abstract @NonNull Map<@NonNull Integer, @NonNull ComplicationSlotMetadata> [getComplicationSlotMetadataMap](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient#getComplicationSlotMetadataMap())()
```

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

Returns a map of `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` ID to `https://developer.android.com/reference/androidx/wear/watchface/client/ComplicationSlotMetadata` for each slot in the watch face's `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotsManager`.

| Throws |
|---|---|
| `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. |

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

```
abstract @NonNull UserStyleFlavors [getUserStyleFlavors](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient#getUserStyleFlavors())()
```

> [!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 watch face's `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleFlavors`.

| Throws |
|---|---|
| `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. |

### getUserStyleSchema

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)

```
abstract @NonNull UserStyleSchema [getUserStyleSchema](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient#getUserStyleSchema())()
```

> [!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 watch face's `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSchema`.

| Throws |
|---|---|
| `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. |

### isUserStyleSchemaStatic

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)

```
abstract boolean [isUserStyleSchemaStatic](https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient#isUserStyleSchemaStatic())()
```

> [!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 `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSchema` is static and won't change unless the APK is updated.