EditorServiceClient


Note: As of July 10, 2024, watch faces must use the Watch Face Format in order to be installed on new watches that launch with Wear OS 5 pre-installed. Learn more about the user-facing changes in this Help Center article.

Additionally, starting in early 2025 (specific date to be announced during Q4 2024), all new watch faces published on Google Play must use the Watch Face Format.

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.