MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor


class MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor


Contains a route, its selection state and its capabilities.

Summary

Constants

const Int

The route is selected.

const Int

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

const Int

The route is unselected.

const Int

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

Public functions

MediaRouteDescriptor

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

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

Added in 1.1.0
const val SELECTED = 3: Int

The route is selected.

Select operation is done by the route provider.

SELECTING

Added in 1.1.0
const val SELECTING = 2: 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.

UNSELECTED

Added in 1.1.0
const val UNSELECTED = 1: Int

The route is unselected.

Unselect operation is done by the route provider.

UNSELECTING

Added in 1.1.0
const val UNSELECTING = 0: 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.

Public functions

getRouteDescriptor

Added in 1.1.0
fun getRouteDescriptor(): MediaRouteDescriptor

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

getSelectionState

Added in 1.1.0
fun getSelectionState(): Int

Gets the selection state.

isGroupable

Added in 1.1.0
fun isGroupable(): Boolean

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

Only applicable to unselected/unselecting routes. Note that this is NOT mutually exclusive with isTransferable.

isTransferable

Added in 1.1.0
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 this is NOT mutually exclusive with isGroupable.

isUnselectable

Added in 1.1.0
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.