WatchFaceMetadataClient


public interface WatchFaceMetadataClient extends AutoCloseable


Interface for fetching watch face metadata. E.g. the UserStyleSchema and ComplicationSlotMetadata. This must be closed after use to release resources.

Summary

Nested types

Exception thrown by createWatchFaceControlClient if the remote service can't be bound.

Exception thrown by WatchFaceControlClient methods if the service dies during start up.

Public methods

abstract @NonNull Map<@NonNull Integer, @NonNull ComplicationSlotMetadata>

Returns a map of androidx.wear.watchface.ComplicationSlot ID to ComplicationSlotMetadata for each slot in the watch face's androidx.wear.watchface.ComplicationSlotsManager.

abstract @NonNull UserStyleFlavors

Returns the watch face's UserStyleFlavors.

abstract @NonNull UserStyleSchema

Returns the watch face's UserStyleSchema.

abstract boolean

Whether or not the UserStyleSchema is static and won't change unless the APK is updated.

Inherited methods

From java.lang.AutoCloseable
abstract void

Public methods

getComplicationSlotMetadataMap

Added in 1.1.0
abstract @NonNull Map<@NonNull Integer, @NonNull ComplicationSlotMetadatagetComplicationSlotMetadataMap()

Returns a map of androidx.wear.watchface.ComplicationSlot ID to ComplicationSlotMetadata for each slot in the watch face's androidx.wear.watchface.ComplicationSlotsManager.

Throws
kotlin.RuntimeException

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
abstract @NonNull UserStyleFlavors getUserStyleFlavors()

Returns the watch face's UserStyleFlavors.

Throws
kotlin.RuntimeException

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
abstract @NonNull UserStyleSchema getUserStyleSchema()

Returns the watch face's UserStyleSchema.

Throws
kotlin.RuntimeException

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
abstract boolean isUserStyleSchemaStatic()

Whether or not the UserStyleSchema is static and won't change unless the APK is updated.