ConfirmationActivity

public class ConfirmationActivity
extends Activity

java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.view.ContextThemeWrapper
         ↳ android.app.Activity
           ↳ android.support.wearable.activity.ConfirmationActivity


This Activity is used to display confirmation animations after the user completes an action on the wearable. There are three types of confirmations: Success: the action was completed successfully on the wearable. Failure: the action failed to complete. Open on Phone: the action has caused something to display on the phone, or in order to complete the action, the user will need to go to their phone to continue.

It is the responsibility of the wearable application developer to determine whether the action has succeeded, failed, or requires the user to go to their phone, and trigger the appropriate confirmation.

To configure the confirmation according to the result of the action, set the extra EXTRA_ANIMATION_TYPE to one of the following values:

SUCCESS_ANIMATION
Displays a positive confirmation animation with an optional message.
OPEN_ON_PHONE_ANIMATION
Displays an animation indicating an action has been sent to a paired device.
FAILURE_ANIMATION
Displays a generic failure page with an optional message.
An optional message, included in the extra EXTRA_MESSAGE will be displayed horizontally centered below the animation.

Summary

Constants

String EXTRA_ANIMATION_TYPE

String EXTRA_MESSAGE

int FAILURE_ANIMATION

int OPEN_ON_PHONE_ANIMATION

int SUCCESS_ANIMATION

Inherited constants

From class android.app.Activity
From class android.content.Context
From interface android.content.ComponentCallbacks2

Inherited fields

From class android.app.Activity

Public constructors

ConfirmationActivity()

Public methods

void onCreate(Bundle savedInstanceState)

Inherited methods

From class android.app.Activity
From class android.view.ContextThemeWrapper
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.view.LayoutInflater.Factory2
From interface android.view.Window.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.View.OnCreateContextMenuListener
From interface android.content.ComponentCallbacks2
From interface android.view.Window.OnWindowDismissedCallback
From interface android.view.Window.WindowControllerCallback
From interface android.view.LayoutInflater.Factory
From interface android.content.ComponentCallbacks

Constants

EXTRA_ANIMATION_TYPE

String EXTRA_ANIMATION_TYPE

Constant Value: "animation_type"

EXTRA_MESSAGE

String EXTRA_MESSAGE

Constant Value: "message"

FAILURE_ANIMATION

int FAILURE_ANIMATION

Constant Value: 3 (0x00000003)

OPEN_ON_PHONE_ANIMATION

int OPEN_ON_PHONE_ANIMATION

Constant Value: 2 (0x00000002)

SUCCESS_ANIMATION

int SUCCESS_ANIMATION

Constant Value: 1 (0x00000001)

Public constructors

ConfirmationActivity

ConfirmationActivity ()

Public methods

onCreate

void onCreate (Bundle savedInstanceState)

Parameters
savedInstanceState Bundle