public static class MediaRouter.RouteGroup extends MediaRouter.RouteInfo
PLAYBACK_TYPE_LOCAL, PLAYBACK_TYPE_REMOTE, PLAYBACK_VOLUME_FIXED, PLAYBACK_VOLUME_VARIABLE, STATUS_AVAILABLE, STATUS_CONNECTING, STATUS_NONE, STATUS_NOT_AVAILABLE, STATUS_SCANNING
Modifier and Type | Method and Description |
---|---|
void |
addRoute(MediaRouter.RouteInfo route)
Add a route to this group.
|
void |
addRoute(MediaRouter.RouteInfo route,
int insertAt)
Add a route to this group before the specified index.
|
MediaRouter.RouteInfo |
getRouteAt(int index)
Return the route in this group at the specified index
|
int |
getRouteCount() |
void |
removeRoute(int index)
Remove the route at the specified index from this group.
|
void |
removeRoute(MediaRouter.RouteInfo route)
Remove a route from this group.
|
void |
requestSetVolume(int volume)
Request a volume change for this route.
|
void |
requestUpdateVolume(int direction)
Request an incremental volume update for this route.
|
void |
setIconDrawable(Drawable icon)
Set an icon that will be used to represent this group.
|
void |
setIconResource(int resId)
Set an icon that will be used to represent this group.
|
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
getCategory, getGroup, getIconDrawable, getName, getName, getPlaybackStream, getPlaybackType, getPresentationDisplay, getStatus, getStatusCode, getSupportedTypes, getTag, getVolume, getVolumeHandling, getVolumeMax, isEnabled, setTag
public void addRoute(MediaRouter.RouteInfo route)
route
- route to add to this grouppublic void addRoute(MediaRouter.RouteInfo route, int insertAt)
route
- route to addinsertAt
- insert the new route before this indexpublic void removeRoute(MediaRouter.RouteInfo route)
route
- route to removepublic void removeRoute(int index)
index
- index of the route to removepublic int getRouteCount()
public MediaRouter.RouteInfo getRouteAt(int index)
index
- Index to fetchpublic void setIconDrawable(Drawable icon)
icon
- icon drawable to use to represent this grouppublic void setIconResource(int resId)
resId
- Resource ID of an icon drawable to use to represent this grouppublic void requestSetVolume(int volume)
MediaRouter.RouteInfo
requestSetVolume
in class MediaRouter.RouteInfo
volume
- value between 0 and getVolumeMaxpublic void requestUpdateVolume(int direction)
MediaRouter.RouteInfo
requestUpdateVolume
in class MediaRouter.RouteInfo
direction
- Delta to apply to the current volumepublic String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
toString
in class MediaRouter.RouteInfo