Language

MediaRouter2.RegisterRouteListingPreferenceUpdatedCallback Method

Definition

Registers the given callback to be invoked when the RouteListingPreference of the target router changes.

[Android.Runtime.Register("registerRouteListingPreferenceUpdatedCallback", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=35)]
public void RegisterRouteListingPreferenceUpdatedCallback(Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer routeListingPreferenceCallback);
[<Android.Runtime.Register("registerRouteListingPreferenceUpdatedCallback", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=35)>]
member this.RegisterRouteListingPreferenceUpdatedCallback : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

Parameters

executor
IExecutor

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.

routeListingPreferenceCallback
IConsumer
Attributes

Remarks

Registers the given callback to be invoked when the RouteListingPreference of the target router changes.

Calls using a previously registered callback will overwrite the previous executor.

Java documentation for android.media.MediaRouter2.registerRouteListingPreferenceUpdatedCallback(java.util.concurrent.Executor, java.util.function.Consumer<android.media.RouteListingPreference>).

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