WatchFaceEditorContract


open class WatchFaceEditorContract : ActivityResultContract


An ActivityResultContract for invoking a watch face editor. Note watch face editors are invoked by SysUI and the normal activity result isn't used for returning EditorState because Activity.onStop isn't guaranteed to be called when SysUI UX needs it to. Instead EditorState is broadcast by the editor usingEditorSession.close, to observe these broadcasts use WatchFaceControlClient.getEditorServiceClient and EditorServiceClient.addListener.

use Watch Face Format instead

Summary

Constants

const String

This property 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.

Public functions

open Intent
createIntent(context: Context, input: EditorRequest)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

open Unit
parseResult(resultCode: Int, intent: Intent?)

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Inherited functions

From androidx.activity.result.contract.ActivityResultContract
open ActivityResultContract.SynchronousResult<Unit>?

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Constants

ACTION_WATCH_FACE_EDITOR

const val ACTION_WATCH_FACE_EDITORString

Public constructors

WatchFaceEditorContract

Added in 1.0.0
Deprecated in 1.3.0-alpha06
WatchFaceEditorContract()

Public functions

createIntent

Added in 1.0.0
Deprecated in 1.3.0-alpha06
open fun createIntent(context: Context, input: EditorRequest): Intent

Create an intent that can be used for android.app.Activity.startActivityForResult.

parseResult

Added in 1.0.0
Deprecated in 1.3.0-alpha06
open fun parseResult(resultCode: Int, intent: Intent?): Unit

Convert result obtained from android.app.Activity.onActivityResult to O.