RemoteInput Class

Definition

A RemoteInput object specifies input to be collected from a user to be passed along with an intent inside a PendingIntent that is sent.

[Android.Runtime.Register("android/app/RemoteInput", DoNotGenerateAcw=true)]
public sealed class RemoteInput : Java.Lang.Object, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/app/RemoteInput", DoNotGenerateAcw=true)>]
type RemoteInput = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
RemoteInput
Attributes
Implements

Remarks

A RemoteInput object specifies input to be collected from a user to be passed along with an intent inside a PendingIntent that is sent. Always use RemoteInput.Builder to create instances of this class. See Replying to notifications for more information on how to use this class. The following example adds a RemoteInput to a Notification.Action, sets the result key as quick_reply, and sets the label as Quick reply. Users are prompted to input a response when they trigger the action. The results are sent along with the intent and can be retrieved with the result key (provided to the Builder constructor) from the Bundle returned by getResultsFromIntent(Intent). When the PendingIntent is fired, the intent inside will contain the input results if collected. To access these results, use the getResultsFromIntent(Intent) function. The result values will present under the result key passed to the Builder constructor.

Android reference for android.app.RemoteInput.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Fields

Name Description
EditChoicesBeforeSendingAuto
Obsolete.

The platform will determine whether choices will be edited before being sent to the app.

EditChoicesBeforeSendingDisabled
Obsolete.

Tapping on a choice should send the input immediately, without letting the user edit it.

EditChoicesBeforeSendingEnabled
Obsolete.

Tapping on a choice should let the user edit the input before it is sent to the app.

ExtraResultsData

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

ResultsClipLabel

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

SourceChoice
Obsolete.

The user selected one of the choices from getChoices().

SourceFreeFormInput
Obsolete.

The user manually entered the data.

Properties

Name Description
AllowedDataTypes

Get possible non-textual inputs that are accepted.

AllowFreeFormInput

Get whether or not users can provide an arbitrary value for input.

Class

Returns the runtime class of this Object.

(Inherited from Object)
Creator
EditChoicesBeforeSending

Gets whether tapping on a choice should let the user edit the input before it is sent to the app.

Extras

Get additional metadata carried around with this remote input.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsDataOnly

Returns true if the input only accepts data, meaning getAllowFreeFormInput() is false, getChoices() is null or empty, and getAllowedDataTypes() is non-null and not empty.

JniIdentityHashCode

Gets the identity hash code assigned to this Java peer by the interop runtime.

(Inherited from Object)
JniPeerMembers

Provides JNI binding infrastructure for Android.App.RemoteInput.

Label
LabelFormatted

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

PeerReference

Gets the JNI object reference for this Java peer.

(Inherited from Object)
ResultKey

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.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

Name Description
AddDataResultToIntent(RemoteInput, Intent, IDictionary<String,Uri>)

Same as addResultsToIntent(RemoteInput, Intent, Bundle) but for setting data results.

AddResultsToIntent(RemoteInput[], Intent, Bundle)

Populate an intent object with the text results gathered from remote input.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
DescribeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Dispose()

Releases the resources held by this Java peer.

(Inherited from Object)
Dispose(Boolean)

Releases the resources held by this Java peer.

(Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetChoices()

Get possible input choices.

GetChoicesFormatted()

Get possible input choices.

GetDataResultsFromIntent(Intent, String)

Similar as getResultsFromIntent(Intent) but retrieves data results for a specific RemoteInput result.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetResultsFromIntent(Intent)

Get the remote input text results bundle from an intent.

GetResultsSource(Intent)

Get the source of the RemoteInput results.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetResultsSource(Intent, RemoteInputSource)

Set the source of the RemoteInput results.

ToArray<T>()

Creates a managed array from this Java array wrapper.

(Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime()

Unregisters this Java peer from the interop runtime.

(Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

Flatten this object in to a Parcel.

Explicit Interface Implementations

Name Description
IJavaPeerable.Disposed()

Notifies the interop runtime that this managed peer has been disposed.

(Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced()

Releases this Java peer unless it is retained by another managed reference.

(Inherited from Object)
IJavaPeerable.Finalized()

Notifies the interop runtime that this managed peer has been finalized.

(Inherited from Object)
IJavaPeerable.JniManagedPeerState

Gets the state that describes the relationship between this managed peer and its JNI reference.

(Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32)

Sets the interop identity hash code for this Java peer.

(Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

Sets the managed and JNI peer state for this Java peer.

(Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference)

Sets the JNI object reference used by this managed peer.

(Inherited from Object)

Extension Methods

Name Description
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to