EditorRequest
class EditorRequest
The request sent by WatchFaceEditorContract.createIntent.
use Watch Face Format instead
Summary
Public companion functions |
|
|---|---|
EditorRequest |
This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public constructors |
|---|
This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
@RequiresApi(value = 30)This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public properties |
|
|---|---|
String |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
DeviceConfig? |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
UserStyleData? |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
PreviewScreenshotParams? |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
ComponentName |
This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
WatchFaceId |
@RequiresApi(value = 30)This property is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public companion functions
createFromIntent
funcreateFromIntent(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.
| Throws | |
|---|---|
kotlinx.coroutines.TimeoutCancellationException |
in case of en error. |
Public constructors
EditorRequest
EditorRequest(
watchFaceComponentName: ComponentName,
editorPackageName: String,
initialUserStyle: UserStyleData?
)
Constructs an EditorRequest without a WatchFaceId. This is for use pre-android R.
| Parameters | |
|---|---|
watchFaceComponentName: ComponentName |
The |
editorPackageName: String |
The package name of the watch face editor APK. |
initialUserStyle: UserStyleData? |
The initial |
EditorRequest
@RequiresApi(value = 30)EditorRequest(
watchFaceComponentName: ComponentName,
editorPackageName: String,
initialUserStyle: UserStyleData?,
watchFaceId: WatchFaceId,
headlessDeviceConfig: DeviceConfig?,
previewScreenshotParams: PreviewScreenshotParams?
)
| Parameters | |
|---|---|
watchFaceComponentName: ComponentName |
The |
editorPackageName: String |
The package name of the watch face editor APK. |
initialUserStyle: UserStyleData? |
The initial |
watchFaceId: WatchFaceId |
Unique ID for the instance of the watch face being edited, only defined for Android R and beyond, it's |
headlessDeviceConfig: DeviceConfig? |
If |
previewScreenshotParams: PreviewScreenshotParams? |
If |
Public properties
editorPackageName
val editorPackageName: String
The package name of the watch face editor APK.
headlessDeviceConfig
val headlessDeviceConfig: DeviceConfig?
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 supportsWatchFaceHeadlessEditing can be used to determine if this feature is supported. If it's not supported this parameter will be ignored.
initialUserStyle
val initialUserStyle: UserStyleData?
The initial UserStyle stored as a UserStyleData or null. Only required for a headless EditorSession.
previewScreenshotParams
val previewScreenshotParams: 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.
watchFaceComponentName
val watchFaceComponentName: ComponentName
The ComponentName of the watch face being edited.
watchFaceId
@RequiresApi(value = 30)
val watchFaceId: 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. Note each distinct ComponentName can have multiple instances.