# EditorRequest

Artifact: [androidx.wear.watchface:watchface-editor](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/editor/WatchFaceEditorContract.kt+class:androidx.wear.watchface.editor.EditorRequest) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***

<br />

```
class EditorRequest
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The request sent by `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/WatchFaceEditorContract#createIntent(android.content.Context,androidx.wear.watchface.editor.EditorRequest)`.

use Watch Face Format instead

## Summary

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest` | `[createFromIntent](https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#createFromIntent(android.content.Intent))(intent: https://developer.android.com/reference/android/content/Intent.html)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public constructors |
|---|
| `[EditorRequest](https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#EditorRequest(android.content.ComponentName,kotlin.String,androidx.wear.watchface.style.UserStyleData))( watchFaceComponentName: https://developer.android.com/reference/android/content/ComponentName.html, editorPackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, initialUserStyle: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData? )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi(value = 30) [EditorRequest](https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#EditorRequest(android.content.ComponentName,kotlin.String,androidx.wear.watchface.style.UserStyleData,androidx.wear.watchface.client.WatchFaceId,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.editor.PreviewScreenshotParams))( watchFaceComponentName: https://developer.android.com/reference/android/content/ComponentName.html, editorPackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, initialUserStyle: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData?, watchFaceId: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceId, headlessDeviceConfig: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig?, previewScreenshotParams: https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/PreviewScreenshotParams? )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#editorPackageName()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig?` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#headlessDeviceConfig()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData?` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#initialUserStyle()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/PreviewScreenshotParams?` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#previewScreenshotParams()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/android/content/ComponentName.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#watchFaceComponentName()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceId` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi(value = 30) https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#watchFaceId()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public companion functions

### createFromIntent

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
fun [createFromIntent](https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#createFromIntent(android.content.Intent))(intent: Intent): EditorRequest
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Returns an `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest` saved to a `https://developer.android.com/reference/android/content/Intent.html` by `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/WatchFaceEditorContract#createIntent(android.content.Context,androidx.wear.watchface.editor.EditorRequest)` if there is one or `null` otherwise. Intended for use by the watch face editor activity.

| Throws |
|---|---|
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-timeout-cancellation-exception/index.html` | in case of en error. |

## Public constructors

### EditorRequest

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
[EditorRequest](https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#EditorRequest(android.content.ComponentName,kotlin.String,androidx.wear.watchface.style.UserStyleData))(
    watchFaceComponentName: ComponentName,
    editorPackageName: String,
    initialUserStyle: UserStyleData?
)
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Constructs an `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest` without a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/WatchFaceId`. This is for use pre-android R.

| Parameters |
|---|---|
| `watchFaceComponentName: https://developer.android.com/reference/android/content/ComponentName.html` | The `https://developer.android.com/reference/android/content/ComponentName.html` of the watch face being edited. |
| `editorPackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The package name of the watch face editor APK. |
| `initialUserStyle: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData?` | The initial `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle` stored as a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData` or `null`. Only required for a headless `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorSession`. `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorSession`. |

### EditorRequest

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
@RequiresApi(value = 30)
[EditorRequest](https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest#EditorRequest(android.content.ComponentName,kotlin.String,androidx.wear.watchface.style.UserStyleData,androidx.wear.watchface.client.WatchFaceId,androidx.wear.watchface.client.DeviceConfig,androidx.wear.watchface.editor.PreviewScreenshotParams))(
    watchFaceComponentName: ComponentName,
    editorPackageName: String,
    initialUserStyle: UserStyleData?,
    watchFaceId: WatchFaceId,
    headlessDeviceConfig: DeviceConfig?,
    previewScreenshotParams: PreviewScreenshotParams?
)
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

| Parameters |
|---|---|
| `watchFaceComponentName: https://developer.android.com/reference/android/content/ComponentName.html` | The `https://developer.android.com/reference/android/content/ComponentName.html` of the watch face being edited. |
| `editorPackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The package name of the watch face editor APK. |
| `initialUserStyle: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData?` | The initial `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle` stored as a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData` or `null`. Only required for a headless `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorSession`. |
| `watchFaceId: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/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 `https://developer.android.com/reference/android/content/ComponentName.html` can have multiple instances. |
| `headlessDeviceConfig: https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig?` | If `non-null` then this is the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig` to use when creating a headless instance to back the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorSession`. If `null` then the current interactive instance will be used. If there isn't one then the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorSession` won't launch until it's been created. Note `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest.Companion#supportsWatchFaceHeadlessEditing(android.content.pm.PackageManager,kotlin.String)` can be used to determine if this feature is supported. If it's not supported this parameter will be ignored. |
| `previewScreenshotParams: https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/PreviewScreenshotParams?` | If `non-null` then `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorSession` upon closing will render a screenshot with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/PreviewScreenshotParams` using the existing interactive or headless instance which will be sent in `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/EditorState` to any registered clients. |

## Public properties

### editorPackageName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
val editorPackageName: String
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The package name of the watch face editor APK.

### headlessDeviceConfig

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
val headlessDeviceConfig: DeviceConfig?
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

If `non-null` then this is the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/DeviceConfig` to use when creating a headless instance to back the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorSession`. If `null` then the current interactive instance will be used. If there isn't one then the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorSession` won't launch until it's been created. Note `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorRequest.Companion#supportsWatchFaceHeadlessEditing(android.content.pm.PackageManager,kotlin.String)` can be used to determine if this feature is supported. If it's not supported this parameter will be ignored.

### initialUserStyle

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
val initialUserStyle: UserStyleData?
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The initial `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyle` stored as a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleData` or `null`. Only required for a headless `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorSession`.

### previewScreenshotParams

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
val previewScreenshotParams: PreviewScreenshotParams?
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

If `non-null` then `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/EditorSession` upon closing will render a screenshot with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/editor/PreviewScreenshotParams` using the existing interactive or headless instance which will be sent in `https://developer.android.com/reference/kotlin/androidx/wear/watchface/client/EditorState` to any registered clients.

### watchFaceComponentName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
val watchFaceComponentName: ComponentName
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The `https://developer.android.com/reference/android/content/ComponentName.html` of the watch face being edited.

### watchFaceId

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
@RequiresApi(value = 30)
val watchFaceId: WatchFaceId
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

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 `https://developer.android.com/reference/android/content/ComponentName.html` can have multiple instances.