MediaRouter.GroupRouteInfo
public class MediaRouter.GroupRouteInfo extends MediaRouter.RouteInfo
| java.lang.Object | ||
| ↳ | androidx.mediarouter.media.MediaRouter.RouteInfo | |
| ↳ | androidx.mediarouter.media.MediaRouter.GroupRouteInfo |
Provides information about a media route that represents a dynamic group.
Summary
Constants |
|
|---|---|
static final int |
Adding a route to a dynamic group has failed because the route is already in the group. |
static final int |
Adding a route to a dynamic group has failed because the group route is a connected route but there is no available route connection for adding a route. |
static final int |
Adding a route to a dynamic group has failed because the route is not groupable. |
static final int |
Adding a route to a dynamic group has failed because the group route doesn't support adding a route. |
static final int |
The |
static final int |
Removing a route from a dynamic group has failed because the route is the last route in the group. |
static final int |
Removing a route from a dynamic group has failed because the group route is a connected route but there is no available route connection for removing a route. |
static final int |
Removing a route from a dynamic group has failed because the route isn't in the group. |
static final int |
Removing a route from a dynamic group has failed because the route is not unselectable. |
static final int |
Removing a route from a dynamic group has failed because the group route doesn't support removing a route. |
static final int |
The |
Public methods |
|
|---|---|
int |
Adds the route as a member of the dynamic group if the route is groupable. |
@NonNull List<MediaRouter.RouteInfo> |
Returns the list of |
int |
Gets the selection state of the route when the route is in the dynamic group or |
boolean |
Returns |
boolean |
isGroupable(@NonNull MediaRouter.RouteInfo route)Returns |
boolean |
Returns |
int |
Removes the route from the dynamic group if the route is unselectable. |
Inherited Constants |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited methods |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Constants
ADD_ROUTE_FAILED_REASON_ALREADY_IN_GROUP
public static final int ADD_ROUTE_FAILED_REASON_ALREADY_IN_GROUP = 3
Adding a route to a dynamic group has failed because the route is already in the group.
| See also | |
|---|---|
addRoute |
ADD_ROUTE_FAILED_REASON_NOT_AVAILABLE_ROUTE_CONNECTION
public static final int ADD_ROUTE_FAILED_REASON_NOT_AVAILABLE_ROUTE_CONNECTION = 5
Adding a route to a dynamic group has failed because the group route is a connected route but there is no available route connection for adding a route.
| See also | |
|---|---|
addRoute |
ADD_ROUTE_FAILED_REASON_NOT_GROUPABLE
public static final int ADD_ROUTE_FAILED_REASON_NOT_GROUPABLE = 2
Adding a route to a dynamic group has failed because the route is not groupable.
| See also | |
|---|---|
addRoute |
ADD_ROUTE_FAILED_REASON_UNSUPPORTED_FOR_GROUP_ROUTE
public static final int ADD_ROUTE_FAILED_REASON_UNSUPPORTED_FOR_GROUP_ROUTE = 4
Adding a route to a dynamic group has failed because the group route doesn't support adding a route.
| See also | |
|---|---|
addRoute |
ADD_ROUTE_SUCCESSFUL
public static final int ADD_ROUTE_SUCCESSFUL = 1
The addRoute has added a route to the dynamic group.
| See also | |
|---|---|
addRoute |
REMOVE_ROUTE_FAILED_REASON_LAST_ROUTE_IN_GROUP
public static final int REMOVE_ROUTE_FAILED_REASON_LAST_ROUTE_IN_GROUP = 4
Removing a route from a dynamic group has failed because the route is the last route in the group.
| See also | |
|---|---|
removeRoute |
REMOVE_ROUTE_FAILED_REASON_NOT_AVAILABLE_ROUTE_CONNECTION
public static final int REMOVE_ROUTE_FAILED_REASON_NOT_AVAILABLE_ROUTE_CONNECTION = 6
Removing a route from a dynamic group has failed because the group route is a connected route but there is no available route connection for removing a route.
| See also | |
|---|---|
removeRoute |
REMOVE_ROUTE_FAILED_REASON_NOT_IN_GROUP
public static final int REMOVE_ROUTE_FAILED_REASON_NOT_IN_GROUP = 3
Removing a route from a dynamic group has failed because the route isn't in the group.
| See also | |
|---|---|
removeRoute |
REMOVE_ROUTE_FAILED_REASON_NOT_UNSELECTABLE
public static final int REMOVE_ROUTE_FAILED_REASON_NOT_UNSELECTABLE = 2
Removing a route from a dynamic group has failed because the route is not unselectable.
| See also | |
|---|---|
removeRoute |
REMOVE_ROUTE_FAILED_REASON_UNSUPPORTED_FOR_GROUP_ROUTE
public static final int REMOVE_ROUTE_FAILED_REASON_UNSUPPORTED_FOR_GROUP_ROUTE = 5
Removing a route from a dynamic group has failed because the group route doesn't support removing a route.
| See also | |
|---|---|
removeRoute |
REMOVE_ROUTE_SUCCESSFUL
public static final int REMOVE_ROUTE_SUCCESSFUL = 1
The removeRoute has removed a route from the dynamic group.
| See also | |
|---|---|
removeRoute |
Public methods
addRoute
@MainThread
public int addRoute(@NonNull MediaRouter.RouteInfo route)
Adds the route as a member of the dynamic group if the route is groupable.
If the route is not groupable or is already in the dynamic group, then adding it to the dynamic group will do nothing.
| Returns | |
|---|---|
int |
The state of adding a route to the dynamic group. |
| See also | |
|---|---|
isGroupable |
getRoutesInGroup
public @NonNull List<MediaRouter.RouteInfo> getRoutesInGroup()
Returns the list of RouteInfos of the given dynamic group route.
getSelectionState
public int getSelectionState(@NonNull MediaRouter.RouteInfo route)
Gets the selection state of the route when the route is in the dynamic group or NOT_IN_GROUP when the route isn't in the dynamic group.
isConnected
@MainThread
public boolean isConnected()
Returns true if this route is currently connected.
Must be called on the main thread.
| Returns | |
|---|---|
boolean |
True if this route is currently connected |
| See also | |
|---|---|
getConnectedGroupRoutes |
isGroupable
public boolean isGroupable(@NonNull MediaRouter.RouteInfo route)
Returns true if the route is groupable and can be added to the dynamic group with the addRoute method.
isUnselectable
public boolean isUnselectable(@NonNull MediaRouter.RouteInfo route)
Returns true if the route is in the dynamic group and is unselectable from the dynamic group with the removeRoute method.
removeRoute
@MainThread
public int removeRoute(@NonNull MediaRouter.RouteInfo route)
Removes the route from the dynamic group if the route is unselectable.
If the route is not unselectable, not in the dynamic group, or is the last route of the dynamic group, then removing it from the dynamic group will do nothing.
| Returns | |
|---|---|
int |
The state of removing a route from the dynamic group. |
| See also | |
|---|---|
isUnselectable |