to top
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)

Added in API level 16

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)

Added in API level 16

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)

Added in API level 16

Return the route in this group at the specified index

Parameters
index Index to fetch
Returns
  • The route at index

public int getRouteCount ()

Added in API level 16

Returns
  • The number of routes in this group

public void removeRoute (int index)

Added in API level 16

Remove the route at the specified index from this group.

Parameters
index index of the route to remove

public void removeRoute (MediaRouter.RouteInfo route)

Added in API level 16

Remove a route from this group.

Parameters
route route to remove

public void requestSetVolume (int volume)

Added in API level 16

Request a volume change for this route.

Parameters
volume value between 0 and getVolumeMax

public void requestUpdateVolume (int direction)

Added in API level 16

Request an incremental volume update for this route.

Parameters
direction Delta to apply to the current volume

public void setIconDrawable (Drawable icon)

Added in API level 16

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)

Added in API level 16

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 ()

Added in API level 16

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.