EditorServiceClient


public 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

Added in 1.0.0
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

Added in 1.0.0
abstract void closeEditor()

Instructs any open editor to close.

removeListener

Added in 1.0.0
abstract void removeListener(@NonNull EditorListener editorListener)

Unregisters an EditorListener previously registered via addListener.