Language

MediaRouter2.RegisterRouteCallback Method

Definition

Registers a callback to discover routes and to receive events when they change.

[Android.Runtime.Register("registerRouteCallback", "(Ljava/util/concurrent/Executor;Landroid/media/MediaRouter2$RouteCallback;Landroid/media/RouteDiscoveryPreference;)V", "", ApiSince=30)]
public void RegisterRouteCallback(Java.Util.Concurrent.IExecutor executor, Android.Media.MediaRouter2.RouteCallback routeCallback, Android.Media.RouteDiscoveryPreference preference);
[<Android.Runtime.Register("registerRouteCallback", "(Ljava/util/concurrent/Executor;Landroid/media/MediaRouter2$RouteCallback;Landroid/media/RouteDiscoveryPreference;)V", "", ApiSince=30)>]
member this.RegisterRouteCallback : Java.Util.Concurrent.IExecutor * Android.Media.MediaRouter2.RouteCallback * Android.Media.RouteDiscoveryPreference -> 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.

Attributes

Remarks

Java documentation for android.media.MediaRouter2.registerRouteCallback(java.util.concurrent.Executor, android.media.RouteCallback, android.media.RouteDiscoveryPreference).

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