Share via


MediaRouter2.RoutingController.SelectRoute(MediaRoute2Info) Method

Definition

Selects a route for the remote session.

[Android.Runtime.Register("selectRoute", "(Landroid/media/MediaRoute2Info;)V", "GetSelectRoute_Landroid_media_MediaRoute2Info_Handler", ApiSince=30)]
public virtual void SelectRoute (Android.Media.MediaRoute2Info route);
[<Android.Runtime.Register("selectRoute", "(Landroid/media/MediaRoute2Info;)V", "GetSelectRoute_Landroid_media_MediaRoute2Info_Handler", ApiSince=30)>]
abstract member SelectRoute : Android.Media.MediaRoute2Info -> unit
override this.SelectRoute : Android.Media.MediaRoute2Info -> unit

Parameters

Attributes

Remarks

Selects a route for the remote session. After a route is selected, the media is expected to be played to the all the selected routes. This is different from MediaRouter2#transferTo(MediaRoute2Info) transferring to a route}, where the media is expected to 'move' from one route to another.

The given route must satisfy all of the following conditions:

<ul> <li>It should not be included in #getSelectedRoutes()<li>It should be included in #getSelectableRoutes()</ul>

If the route doesn't meet any of above conditions, it will be ignored.

Java documentation for android.media.MediaRouter2.RoutingController.selectRoute(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