Activity.OnPerformDirectAction Method

Definition

This is called to perform an action previously defined by the app.

[Android.Runtime.Register("onPerformDirectAction", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;Ljava/util/function/Consumer;)V", "GetOnPerformDirectAction_Ljava_lang_String_Landroid_os_Bundle_Landroid_os_CancellationSignal_Ljava_util_function_Consumer_Handler", ApiSince=29)]
public virtual void OnPerformDirectAction(string actionId, Android.OS.Bundle arguments, Android.OS.CancellationSignal cancellationSignal, Java.Util.Functions.IConsumer resultListener);
[<Android.Runtime.Register("onPerformDirectAction", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;Ljava/util/function/Consumer;)V", "GetOnPerformDirectAction_Ljava_lang_String_Landroid_os_Bundle_Landroid_os_CancellationSignal_Ljava_util_function_Consumer_Handler", ApiSince=29)>]
abstract member OnPerformDirectAction : string * Android.OS.Bundle * Android.OS.CancellationSignal * Java.Util.Functions.IConsumer -> unit
override this.OnPerformDirectAction : string * Android.OS.Bundle * Android.OS.CancellationSignal * Java.Util.Functions.IConsumer -> unit

Parameters

actionId
String

String: The ID for the action you previously reported via onGetDirectActions(CancellationSignal,Consumer). This value cannot be null.

arguments
Bundle

Bundle: Any additional arguments provided by the caller that are specific to the given action. This value cannot be null.

cancellationSignal
CancellationSignal

CancellationSignal: A signal to cancel the operation in progress. This value cannot be null.

resultListener
IConsumer

Consumer: The callback to provide the result back to the caller. You can call this on any thread. The result bundle is action specific. This value cannot be null.

Attributes

Remarks

This is called to perform an action previously defined by the app. Apps also have access to getVoiceInteractor() to follow up on the action.

See also:

Android reference for android.app.Activity.onPerformDirectAction.

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.

Applies to