public class

ConfirmationActivity

extends Activity

Note: The Wearable Support Library classes under the android.support.wearable package are subject to change. For the full Android API reference, see Reference.

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

Class Overview

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 invoke a confirmation animation, start this Activity using an Intent populated with the following extras:

  • EXTRA_ANIMATION_TYPE: Which type of confirmation, either SUCCESS_ANIMATION, OPEN_ON_PHONE_ANIMATION, or FAILURE_ANIMATION.
  • EXTRA_MESSAGE: Optional message to include beneath the animation. If omitted, the animation will be displayed without a message.

Summary

Constants
String EXTRA_ANIMATION_TYPE
String EXTRA_MESSAGE
int FAILURE_ANIMATION
int OPEN_ON_PHONE_ANIMATION
int SUCCESS_ANIMATION
[Expand]
Inherited Constants
From class android.app.Activity
From class android.content.Context
From interface android.content.ComponentCallbacks2
[Expand]
Inherited Fields
From class android.app.Activity
Public Constructors
ConfirmationActivity()
Public Methods
void onCreate(Bundle savedInstanceState)
[Expand]
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.LayoutInflater.Factory
From interface android.content.ComponentCallbacks

Constants

public static final String EXTRA_ANIMATION_TYPE

Constant Value: "animation_type"

public static final String EXTRA_MESSAGE

Constant Value: "message"

public static final int FAILURE_ANIMATION

Constant Value: 3 (0x00000003)

public static final int OPEN_ON_PHONE_ANIMATION

Constant Value: 2 (0x00000002)

public static final int SUCCESS_ANIMATION

Constant Value: 1 (0x00000001)

Public Constructors

public ConfirmationActivity ()

Public Methods

public void onCreate (Bundle savedInstanceState)