public static class MediaRouter.RouteGroup extends MediaRouter.RouteInfo
MediaRouter.RouteInfo.DeviceType, MediaRouter.RouteInfo.PlaybackType
DEVICE_TYPE_BLUETOOTH, DEVICE_TYPE_SPEAKER, DEVICE_TYPE_TV, DEVICE_TYPE_UNKNOWN, PLAYBACK_TYPE_LOCAL, PLAYBACK_TYPE_REMOTE, PLAYBACK_VOLUME_FIXED, PLAYBACK_VOLUME_VARIABLE, STATUS_AVAILABLE, STATUS_CONNECTED, STATUS_CONNECTING, STATUS_IN_USE, 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 representation of the object.
|
getCategory, getDescription, getDeviceAddress, getDeviceType, getGroup, getIconDrawable, getName, getName, getPlaybackStream, getPlaybackType, getPresentationDisplay, getStatus, getStatusCode, getSupportedTypes, getTag, getVolume, getVolumeHandling, getVolumeMax, isConnecting, isDefault, isEnabled, isSelected, matchesTypes, select, 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(@DrawableRes 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
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
in class MediaRouter.RouteInfo