Android APIs
public class

RemoteInput

extends RemoteInputCompatBase.RemoteInput
java.lang.Object
   ↳ android.support.v4.app.RemoteInputCompatBase.RemoteInput
     ↳ android.support.v4.app.RemoteInput

Class Overview

Helper for using the RemoteInput API introduced after API level 4 in a backwards compatible fashion.

Summary

Nested Classes
class RemoteInput.Builder Builder class for RemoteInput objects. 
Constants
String EXTRA_RESULTS_DATA Extra added to a clip data intent object to hold the results bundle.
String RESULTS_CLIP_LABEL Label used to denote the clip data type used for remote input transport
Public Methods
static void addResultsToIntent(RemoteInput[] remoteInputs, Intent intent, Bundle results)
Populate an intent object with the results gathered from remote input.
boolean getAllowFreeFormInput()
Get whether or not users can provide an arbitrary value for input.
CharSequence[] getChoices()
Get possible input choices.
Bundle getExtras()
Get additional metadata carried around with this remote input.
CharSequence getLabel()
Get the label to display to users when collecting this input.
String getResultKey()
Get the key that the result of this input will be set in from the Bundle returned by getResultsFromIntent(Intent) when the PendingIntent is sent.
static Bundle getResultsFromIntent(Intent intent)
Get the remote input results bundle from an intent.
[Expand]
Inherited Methods
From class android.support.v4.app.RemoteInputCompatBase.RemoteInput
From class java.lang.Object

Constants

public static final String EXTRA_RESULTS_DATA

Extra added to a clip data intent object to hold the results bundle.

Constant Value: "android.remoteinput.resultsData"

public static final String RESULTS_CLIP_LABEL

Label used to denote the clip data type used for remote input transport

Constant Value: "android.remoteinput.results"

Public Methods

public static void addResultsToIntent (RemoteInput[] remoteInputs, Intent intent, Bundle results)

Populate an intent object with the results gathered from remote input. This method should only be called by remote input collection services when sending results to a pending intent.

Parameters
remoteInputs The remote inputs for which results are being provided
intent The intent to add remote inputs to. The ClipData field of the intent will be modified to contain the results.
results A bundle holding the remote input results. This bundle should be populated with keys matching the result keys specified in remoteInputs with values being the result per key.

public boolean getAllowFreeFormInput ()

Get whether or not users can provide an arbitrary value for input. If you set this to false, users must select one of the choices in getChoices(). An IllegalArgumentException is thrown if you set this to false and getChoices() returns null or empty.

public CharSequence[] getChoices ()

Get possible input choices. This can be null if there are no choices to present.

public Bundle getExtras ()

Get additional metadata carried around with this remote input.

public CharSequence getLabel ()

Get the label to display to users when collecting this input.

public String getResultKey ()

Get the key that the result of this input will be set in from the Bundle returned by getResultsFromIntent(Intent) when the PendingIntent is sent.

public static Bundle getResultsFromIntent (Intent intent)

Get the remote input results bundle from an intent. The returned Bundle will contain a key/value for every result key populated by remote input collector. Use the getCharSequence(String) method to retrieve a value.

Parameters
intent The intent object that fired in response to an action or content intent which also had one or more remote input requested.