# ListenableWatchFaceMetadataClient

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

*** ** * ** ***

<br />

```
public final class ListenableWatchFaceMetadataClient
```

<br />

*** ** * ** ***

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

`https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html`-based compatibility wrapper around `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient.Companion#create(android.content.Context,android.content.ComponentName)`.

use Watch Face Format instead

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient>` | `[create](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceMetadataClient#create(android.content.Context,android.content.ComponentName))(@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/android/content/ComponentName.html watchFaceName)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient>` | `[createForRuntime](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceMetadataClient#createForRuntime(android.content.Context,android.content.ComponentName,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/android/content/ComponentName.html watchFaceName, @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. |

## Public methods

### create

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 static final @NonNull ListenableFuture<@NonNull WatchFaceMetadataClient> [create](https://developer.android.com/reference/androidx/wear/watchface/client/ListenableWatchFaceMetadataClient#create(android.content.Context,android.content.ComponentName))(@NonNull Context context, @NonNull ComponentName watchFaceName)
```

> [!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/WatchFaceMetadataClient` for fetching metadata for the specified watch face.

| 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/android/content/ComponentName.html watchFaceName` | The `https://developer.android.com/reference/android/content/ComponentName.html` of the watch face to fetch meta data from. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` which resolves with `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient` if there is one, otherwise it throws a `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient.ServiceNotBoundException` if the underlying watch face control service can not be bound or a `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient.ServiceStartFailureException` if the watch face dies during startup. |

### createForRuntime

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

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

Constructs a `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient` for fetching metadata for the specified resource only watch face runtime. A resource only watch face runtime, is a special kind of watch face that is the runtime for a watch face defined by another package that contains only resources and no executable code.

| 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/android/content/ComponentName.html watchFaceName` | The `https://developer.android.com/reference/android/content/ComponentName.html` of the watch face to fetch meta data from. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html resourceOnlyWatchFacePackageName` | The package the runtime should load the resources from. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` which resolves with `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient` if there is one, otherwise it throws a `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient.ServiceNotBoundException` if the underlying watch face control service can not be bound or a `https://developer.android.com/reference/androidx/wear/watchface/client/WatchFaceMetadataClient.ServiceStartFailureException` if the watch face dies during startup. |