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 functions

Unit
addListener(editorListener: EditorListener, listenerExecutor: Executor)

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

Unit

Instructs any open editor to close.

Unit
removeListener(editorListener: EditorListener)

Unregisters an EditorListener previously registered via addListener.

Public functions

addListener

Added in 1.0.0
fun addListener(editorListener: EditorListener, listenerExecutor: Executor): Unit

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
fun closeEditor(): Unit

Instructs any open editor to close.

removeListener

Added in 1.0.0
fun removeListener(editorListener: EditorListener): Unit

Unregisters an EditorListener previously registered via addListener.