MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor


public final class MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor


Contains a route, its selection state and its capabilities.

Summary

Constants

static final int

The route is selected.

static final int

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

static final int

The route is unselected.

static final int

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

Public methods

@NonNull 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
public static final int SELECTED = 3

The route is selected.

Select operation is done by the route provider.

SELECTING

Added in 1.1.0
public static final int SELECTING = 2

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
public static final int UNSELECTED = 1

The route is unselected.

Unselect operation is done by the route provider.

UNSELECTING

Added in 1.1.0
public static final int UNSELECTING = 0

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 methods

getRouteDescriptor

Added in 1.1.0
public @NonNull MediaRouteDescriptor getRouteDescriptor()

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

getSelectionState

Added in 1.1.0
public int getSelectionState()

Gets the selection state.

isGroupable

Added in 1.1.0
public boolean isGroupable()

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

isUnselectable

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