VoiceInteractor.RegisterOnDestroyedCallback(IExecutor, IRunnable) Method

Definition

Registers a callback to be called when the VoiceInteractor is destroyed.

[Android.Runtime.Register("registerOnDestroyedCallback", "(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)Z", "", ApiSince=29)]
public bool RegisterOnDestroyedCallback(Java.Util.Concurrent.IExecutor executor, Java.Lang.IRunnable callback);
[<Android.Runtime.Register("registerOnDestroyedCallback", "(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)Z", "", ApiSince=29)>]
member this.RegisterOnDestroyedCallback : Java.Util.Concurrent.IExecutor * Java.Lang.IRunnable -> bool

Parameters

executor
IExecutor

Executor: Executor on which to run the callback. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.

callback
IRunnable

Runnable: The callback to run. This value cannot be null.

Returns

whether the callback was registered.

Attributes

Remarks

Registers a callback to be called when the VoiceInteractor is destroyed.

Android reference for android.app.VoiceInteractor.registerOnDestroyedCallback.

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