VoiceInteractionSession.PerformDirectAction Method

Definition

Asks that an action be performed by the app.

[Android.Runtime.Register("performDirectAction", "(Landroid/app/DirectAction;Landroid/os/Bundle;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=29)]
public void PerformDirectAction (Android.App.DirectAction action, Android.OS.Bundle? extras, Android.OS.CancellationSignal? cancellationSignal, Java.Util.Concurrent.IExecutor resultExecutor, Java.Util.Functions.IConsumer resultListener);
[<Android.Runtime.Register("performDirectAction", "(Landroid/app/DirectAction;Landroid/os/Bundle;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=29)>]
member this.PerformDirectAction : Android.App.DirectAction * Android.OS.Bundle * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

Parameters

action
DirectAction

The action to be performed.

extras
Bundle

Any optional extras sent to the app as part of the request

cancellationSignal
CancellationSignal

A signal to cancel the operation in progress, or null if none.

resultExecutor
IExecutor

The handler to receive the callback.

resultListener
IConsumer

The callback to receive the response.

Attributes

Remarks

Asks that an action be performed by the app. This will send a request to the app which provided this action.

An action could take time to execute and the result is provided asynchronously via a callback. If the action is taking longer and you want to cancel its execution you can pass in a cancellation signal through which to notify the app to abort the action.

Java documentation for android.service.voice.VoiceInteractionSession.performDirectAction(android.app.DirectAction, android.os.Bundle, android.os.CancellationSignal, java.util.concurrent.Executor, java.util.function.Consumer<android.os.Bundle>).

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