RoutingSessionInfo.TransferableRoutes Property

Definition

Gets the list of IDs of transferable routes for the session.

public System.Collections.Generic.IList<string> TransferableRoutes { [Android.Runtime.Register("getTransferableRoutes", "()Ljava/util/List;", "", ApiSince=30)] get; }
[<get: Android.Runtime.Register("getTransferableRoutes", "()Ljava/util/List;", "", ApiSince=30)>]
member this.TransferableRoutes : System.Collections.Generic.IList<string>

Property Value

A possibly empty list of transferable route ids.

Attributes

Remarks

Gets the list of IDs of transferable routes for the session.

Transferring to a route (for example, using MediaRouter2#transferTo) replaces the list of #getSelectedRoutes() selected routes with the target route, causing playback to move from one route to another.

Note that this is different from #getSelectableRoutes() selectable routes, because selecting a route makes it part of the selected routes, while transferring to a route makes it the selected route. A route can be both transferable and selectable.

Note that playback may transfer across routes without the target route being in the list of transferable routes. This can happen by creating a new routing session to the target route, and releasing the routing session being transferred from. The difference is that a transfer to a route in the transferable list can happen with no intervention from the app, with the route provider taking care of the entire operation. A transfer to a route that is not in the list of transferable routes (by creating a new session) requires the app to move the playback state from one device to the other.

Java documentation for android.media.RoutingSessionInfo.getTransferableRoutes().

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