Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public static class

MediaRouter.RouteGroup

extends MediaRouter.RouteInfo
java.lang.Object
   ↳ android.media.MediaRouter.RouteInfo
     ↳ android.media.MediaRouter.RouteGroup

Class Overview

Information about a route that consists of multiple other routes in a group.

Summary

[Expand]
Inherited Constants
From class android.media.MediaRouter.RouteInfo
Public Methods
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.
[Expand]
Inherited Methods
From class android.media.MediaRouter.RouteInfo
From class java.lang.Object

Public Methods

public void addRoute ( MediaRouter.RouteInfo route)

Add a route to this group. The route must not currently belong to another group.

Parameters
route route to add to this group

public void addRoute ( MediaRouter.RouteInfo route, int insertAt)

Add a route to this group before the specified index.

Parameters
route route to add
insertAt insert the new route before this index

public MediaRouter.RouteInfo getRouteAt (int index)

Return the route in this group at the specified index

Parameters
index Index to fetch
Returns
  • The route at index

public int getRouteCount ()

Returns
  • The number of routes in this group

public void removeRoute (int index)

Remove the route at the specified index from this group.

Parameters
index index of the route to remove

public void removeRoute ( MediaRouter.RouteInfo route)

Remove a route from this group.

Parameters
route route to remove

public void requestSetVolume (int volume)

Request a volume change for this route.

Parameters
volume value between 0 and getVolumeMax

public void requestUpdateVolume (int direction)

Request an incremental volume update for this route.

Parameters
direction Delta to apply to the current volume

public void setIconDrawable ( Drawable icon)

Set an icon that will be used to represent this group. The system may use this icon in picker UIs or similar.

Parameters
icon icon drawable to use to represent this group

public void setIconResource (int resId)

Set an icon that will be used to represent this group. The system may use this icon in picker UIs or similar.

Parameters
resId Resource ID of an icon drawable to use to represent this group

public String toString ()

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

          getClass().getName() + '@' + Integer.toHexString(hashCode())
         

See Writing a useful toString method if you intend implementing your own toString method.

Returns
  • a printable representation of this object.