MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor

public static final class MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor
extends Object

java.lang.Object
   ↳ androidx.mediarouter.media.MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor


Contains a route, its selection state and its capabilities.

Summary

Nested classes

class MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor.Builder

Builder for MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor  

Constants

int SELECTED

The route is selected.

int SELECTING

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

int UNSELECTED

The route is unselected.

int UNSELECTING

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

Public methods

MediaRouteDescriptor getRouteDescriptor()

Gets this route's MediaRouteDescriptor.

int getSelectionState()

Gets the selection state.

boolean isGroupable()

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

boolean isTransferable()

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

boolean isUnselectable()

Returns true if the route can be unselected.

Inherited methods

Constants

SELECTED

public static final int SELECTED

The route is selected.

Select operation is done by the route provider.

Constant Value: 3 (0x00000003)

SELECTING

public static final int SELECTING

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.

Constant Value: 2 (0x00000002)

UNSELECTED

public static final int UNSELECTED

The route is unselected.

Unselect operation is done by the route provider.

Constant Value: 1 (0x00000001)

UNSELECTING

public static final int UNSELECTING

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.

Constant Value: 0 (0x00000000)

Public methods

getRouteDescriptor

public MediaRouteDescriptor getRouteDescriptor ()

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

Returns
MediaRouteDescriptor

getSelectionState

public int getSelectionState ()

Gets the selection state.

Returns
int

isGroupable

public boolean isGroupable ()

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.

Returns
boolean

isTransferable

public boolean isTransferable ()

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.

Returns
boolean

isUnselectable

public boolean isUnselectable ()

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.

Returns
boolean