public class

RemoteInput

extends Object
implements Parcelable
java.lang.Object
   ↳ android.preview.support.wearable.notifications.RemoteInput

Class Overview

A RemoteInput specifies a response to be collected from the user as part of an intent being sent. For example, when used with a notification Action, a response may be collected when the user triggers the action, and the results sent as data along with the action's PendingIntent. The result value is set in the extras of the triggered Intent with the key returnKey.

Use the builder class RemoteInput.Builder to create this object.

Example which adds a RemoteInput to an Action:

 WearableNotifications.Action action = new WearableNotifications.Action.Builder(
         R.drawable.reply, "Reply", actionIntent)
         .addRemoteInput(new RemoteInput.Builder(EXTRA_QUICK_REPLY_TEXT)
                 .setLabel("Quick reply").build())
         .build();

Summary

Nested Classes
class RemoteInput.Builder Builder class for RemoteInput objects. 
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<RemoteInput> CREATOR
public final boolean allowFreeFormInput Indicates whether or not the user may provide an arbitrary value for this input.
public final String[] choices The choices available to the user.
public final String label The label to be displayed to the user when collecting this input.
public final String returnKey The extras key to be populated with input from the user when the intent is sent.
Public Methods
int describeContents()
void writeToParcel(Parcel out, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<RemoteInput> CREATOR

public final boolean allowFreeFormInput

Indicates whether or not the user may provide an arbitrary value for this input. If set to false, then the user should select one of the provided choices. It is an error to set this to false and not provide choices.

public final String[] choices

The choices available to the user. May be null if there are no choices to present to the user.

public final String label

The label to be displayed to the user when collecting this input.

public final String returnKey

The extras key to be populated with input from the user when the intent is sent.

Public Methods

public int describeContents ()

public void writeToParcel (Parcel out, int flags)