EditorServiceClient

interface EditorServiceClient


Client for the watchface editor service, which observes androidx.wear.watchface.editor.EditorSession. This client can be reused to observe multiple editor sessions.

Summary

Public methods

abstract void
addListener(
    @NonNull EditorListener editorListener,
    @NonNull Executor listenerExecutor
)

Starts listening for EditorState which is sent when androidx.wear.watchface.editor.EditorSession closes.

abstract void

Instructs any open editor to close.

abstract void

Unregisters an EditorListener previously registered via addListener.

Public methods

addListener

@NonNull
public abstract void addListener(
    @NonNull EditorListener editorListener,
    @NonNull Executor listenerExecutor
)

Starts listening for EditorState which is sent when androidx.wear.watchface.editor.EditorSession closes. The EditorListener.onEditorStateChanged callback is run on the specified listenerExecutor.

closeEditor

@NonNull
public abstract void closeEditor()

Instructs any open editor to close.

removeListener

@NonNull
public abstract void removeListener(@NonNull EditorListener editorListener)

Unregisters an EditorListener previously registered via addListener.