HeadlessWatchFaceClient

interface HeadlessWatchFaceClient


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 when finished.

Summary

Nested types

HeadlessWatchFaceClient.ClientDisconnectListener

Callback that observes when the client disconnects.

HeadlessWatchFaceClient.Companion

Public methods

abstract @AnyThread void

Registers a ClientDisconnectListener.

abstract @AnyThread boolean

Returns true if the connection to the server side is alive.

abstract @AnyThread void

Removes a ClientDisconnectListener previously registered by addClientDisconnectListener.

abstract @RequiresApi(value = 27) Bitmap
renderComplicationToBitmap(
    int complicationSlotId,
    RenderParameters renderParameters,
    Instant instant,
    ComplicationData complicationData,
    UserStyle userStyle
)

c Renders the androidx.wear.watchface.ComplicationSlot to a shared memory backed Bitmap with the given settings.

abstract @RequiresApi(value = 27) @NonNull Bitmap