EditorRequest

public final class EditorRequest


The request sent by WatchFaceEditorContract.createIntent.

Summary

Public fields

final @NonNull String

The package name of the watch face editor APK.

final DeviceConfig

If non-null then this is the DeviceConfig to use when creating a headless instance to back the EditorSession.

final UserStyleData

The initial UserStyle stored as a UserStyleData or null.

final PreviewScreenshotParams

If non-null then EditorSession upon closing will render a screenshot with PreviewScreenshotParams using the existing interactive or headless instance which will be sent in EditorState to any registered clients.

final @NonNull ComponentName

The ComponentName of the watch face being edited.

final @NonNull WatchFaceId
@RequiresApi(value = 30)
watchFaceId

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

EditorRequest(
    ComponentName watchFaceComponentName,
    String editorPackageName,
    UserStyleData initialUserStyle
)

Constructs an EditorRequest without a WatchFaceId.

EditorRequest(
    ComponentName watchFaceComponentName,
    String editorPackageName,
    UserStyleData initialUserStyle,
    WatchFaceId watchFaceId,
    DeviceConfig headlessDeviceConfig,
    PreviewScreenshotParams previewScreenshotParams
)

Public fields

editorPackageName

public final @NonNull String editorPackageName

The package name of the watch face editor APK.

headlessDeviceConfig

public final DeviceConfig headlessDeviceConfig

If non-null then this is the DeviceConfig to use when creating a headless instance to back the EditorSession. If null then the current interactive instance will be used. If there isn't one then the EditorSession won't launch until it's been created. Note