Register now for Android Dev Summit 2019!

DynamicRouteDescriptor

class DynamicRouteDescriptor
kotlin.Any
   ↳ androidx.mediarouter.media.MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor

Contains a route, its selection state and its capabilities.

Summary

Nested classes

Builder for DynamicRouteDescriptor

Constants

static Int

The route is selected.

static Int

After a user selects a route, it might take some time for a provider to complete the operation.

static Int

The route is unselected.

static Int

After a user unselects a route, it might take some time for a provider to complete the operation.

Public methods

MediaRouteDescriptor

Gets this route's MediaRouteDescriptor.

Int

Gets the selection state.

Boolean

Returns true if the route can be grouped into the dynamic group route.

Boolean

Returns true if the current dynamic group route can be transferred to this route.

Boolean

Returns true if the route can be unselected.

Constants

SELECTED

static val SELECTED: Int

The route is selected.

Select operation is done by the route provider.

Value: 3

SELECTING

static val SELECTING: Int

After a user selects a route, it might take some time for a provider to complete the operation. This state is used in this between time. MediaRouter can either block the UI or show the route as checked.

Value: 2

UNSELECTED

static val UNSELECTED: Int

The route is unselected.

Unselect operation is done by the route provider.

Value: 1

UNSELECTING

static val UNSELECTING: Int

After a user unselects a route, it might take some time for a provider to complete the operation. This state is used in this between time. MediaRouter can either block the UI or show the route as unchecked.

Value: 0

Public methods

getRouteDescriptor

@NonNull fun getRouteDescriptor(): MediaRouteDescriptor

Gets this route's MediaRouteDescriptor. i.e. which route this info is for.

getSelectionState

fun getSelectionState(): Int

Gets the selection state.

isGroupable

fun isGroupable(): Boolean

Returns true if the route can be grouped into the dynamic group route.

Only applicable to unselected/unselecting routes. Note that isGroupable() and isTransferable() are NOT mutually exclusive.

isTransferable

fun isTransferable(): Boolean

Returns true if the current dynamic group route can be transferred to this route.

Only applicable to unselected/unselecting routes. Note that isGroupable() and isTransferable() are NOT mutually exclusive.

isUnselectable

fun isUnselectable(): Boolean

Returns true if the route can be unselected.

For example, a static group has an old build which doesn't support dynamic group. All its members can't be removed.

Only applicable to selected/selecting routes.