WatchFaceEditorContract
public class WatchFaceEditorContract extends ActivityResultContract
| java.lang.Object | ||
| ↳ | androidx.activity.result.contract.ActivityResultContract | |
| ↳ | androidx.wear.watchface.editor.WatchFaceEditorContract |
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 |
|
|---|---|
static final @NonNull String |
This field is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public constructors |
|---|
|
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Public methods |
|
|---|---|
@NonNull Intent |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
void |
This method is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
Inherited methods |
||
|---|---|---|
|
Constants
Public constructors
Public methods
createIntent
public @NonNull IntentcreateIntent(@NonNull Context context, @NonNull EditorRequest input)
Create an intent that can be used for android.app.Activity.startActivityForResult.
parseResult
public voidparseResult(int resultCode, Intent intent)
Convert result obtained from android.app.Activity.onActivityResult to O.