Android 12 Developer Preview is here! Try it out, and give us your feedback!

EditorRequest

class EditorRequest
kotlin.Any
   ↳ androidx.wear.watchface.editor.EditorRequest

The request sent by WatchFaceEditorContract.createIntent.

Summary

Public constructors
<init>(watchFaceComponentName: ComponentName, editorPackageName: String, watchFaceInstanceId: String?, initialUserStyle: Map<String, String>?)

The request sent by WatchFaceEditorContract.createIntent.

Companion functions
EditorRequest?

Returns an EditorRequest saved to a Intent by WatchFaceEditorContract.createIntent if there is one or null otherwise.

Properties
String

The package name of the watch face editor APK.

Map<String, String>?

The initial UserStyle, only required for a headless EditorSession.

ComponentName

The ComponentName of the watch face being edited.

String?

Unique ID for the instance of the watch face being edited, only defined for Android R and beyond, it's null on Android P and earlier.

Public constructors

<init>

EditorRequest(
    watchFaceComponentName: ComponentName,
    editorPackageName: String,
    watchFaceInstanceId: String?,
    initialUserStyle: Map<String, String>?)

The request sent by WatchFaceEditorContract.createIntent.

Properties

editorPackageName

val editorPackageName: String

The package name of the watch face editor APK.

initialUserStyle

val initialUserStyle: Map<String, String>?

The initial UserStyle, only required for a headless EditorSession.

watchFaceComponentName

val watchFaceComponentName: ComponentName

The ComponentName of the watch face being edited.

watchFaceInstanceId

val watchFaceInstanceId: String?

Unique ID for the instance of the watch face being edited, only defined for Android R and beyond, it's null on Android P and earlier. Note each distinct ComponentName can have multiple instances.

Companion functions

createFromIntent

@JvmStatic fun createFromIntent(intent: Intent): EditorRequest?

Returns an EditorRequest saved to a Intent by WatchFaceEditorContract.createIntent if there is one or null otherwise. Intended for use by the watch face editor activity.