Share via


MediaRouter2.IOnGetControllerHintsListener.OnGetControllerHints Method

Definition

Called when the MediaRouter2 or the system is about to request a media route provider service to create a controller with the given route.

[Android.Runtime.Register("onGetControllerHints", "(Landroid/media/MediaRoute2Info;)Landroid/os/Bundle;", "GetOnGetControllerHints_Landroid_media_MediaRoute2Info_Handler:Android.Media.MediaRouter2/IOnGetControllerHintsListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=30)]
public Android.OS.Bundle? OnGetControllerHints (Android.Media.MediaRoute2Info route);
[<Android.Runtime.Register("onGetControllerHints", "(Landroid/media/MediaRoute2Info;)Landroid/os/Bundle;", "GetOnGetControllerHints_Landroid_media_MediaRoute2Info_Handler:Android.Media.MediaRouter2/IOnGetControllerHintsListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=30)>]
abstract member OnGetControllerHints : Android.Media.MediaRoute2Info -> Android.OS.Bundle

Parameters

route
MediaRoute2Info

the route to create a controller with

Returns

An optional bundle of app-specific arguments to send to the provider, or null if none. The contents of this bundle may affect the result of controller creation.

Attributes

Remarks

Called when the MediaRouter2 or the system is about to request a media route provider service to create a controller with the given route. The Bundle returned here will be sent to media route provider service as a hint.

Since controller creation can be requested by the MediaRouter2 and the system, set the listener as soon as possible after acquiring MediaRouter2 instance. The method will be called on the same thread that calls #transferTo(MediaRoute2Info) or the main thread if it is requested by the system.

Java documentation for android.media.MediaRouter2.OnGetControllerHintsListener.onGetControllerHints(android.media.MediaRoute2Info).

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