ListenableWatchFaceControlClient

public class ListenableWatchFaceControlClient implements WatchFaceControlClient


ListenableFuture-based compatibility wrapper around WatchFaceControlClient's suspending methods. This class is open to allow mocking.

Summary

Public constructors

Public methods

void
HeadlessWatchFaceClient
createHeadlessWatchFaceClient(
    ComponentName watchFaceName,
    DeviceConfig deviceConfig,
    int surfaceWidth,
    int surfaceHeight
)

This method is deprecated. createHeadlessWatchFaceClient without an id is deprecated

HeadlessWatchFaceClient
createHeadlessWatchFaceClient(
    String id,
    ComponentName watchFaceName,
    DeviceConfig deviceConfig,
    int surfaceWidth,
    int surfaceHeight
)

Creates a HeadlessWatchFaceClient with the specified DeviceConfig.

@NonNull Map<@NonNull Integer, @NonNull DefaultComplicationDataSourcePolicyAndType>

Returns a map of androidx.wear.watchface.ComplicationSlot id to the DefaultComplicationDataSourcePolicyAndType for each androidx.wear.watchface.ComplicationSlot in the watchface corresponding to watchFaceName.

@NonNull EditorServiceClient
InteractiveWatchFaceClient

Returns the InteractiveWatchFaceClient for the given instance id, or null if no such instance exists.

@NonNull InteractiveWatchFaceClient
getOrCreateInteractiveWatchFaceClient(
    String id,
    DeviceConfig deviceConfig,
    WatchUiState watchUiState,
    UserStyleData userStyle,
    Map<IntegerComplicationData> slotIdToComplicationData
)