Skip to content

Most visited

Recently visited

navigation

MediaRouter.RouteGroup

public static class MediaRouter.RouteGroup
extends MediaRouter.RouteInfo

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


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

Summary

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(MediaRouter.RouteInfo route)

Remove a route from this group.

void removeRoute(int index)

Remove the route at the specified index 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.

Inherited methods

From class android.media.MediaRouter.RouteInfo
From class java.lang.Object

Public methods

addRoute

Added in API level 16
void addRoute (MediaRouter.RouteInfo route)

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

Parameters
route MediaRouter.RouteInfo: route to add to this group

addRoute

Added in API level 16
void addRoute (MediaRouter.RouteInfo route, 
                int insertAt)

Add a route to this group before the specified index.

Parameters
route MediaRouter.RouteInfo: route to add
insertAt int: insert the new route before this index

getRouteAt

Added in API level 16
MediaRouter.RouteInfo getRouteAt (int index)

Return the route in this group at the specified index

Parameters
index int: Index to fetch
Returns
MediaRouter.RouteInfo The route at index

getRouteCount

Added in API level 16
int getRouteCount ()

Returns
int The number of routes in this group

removeRoute

Added in API level 16
void removeRoute (MediaRouter.RouteInfo route)

Remove a route from this group.

Parameters
route MediaRouter.RouteInfo: route to remove

removeRoute

Added in API level 16
void removeRoute (int index)

Remove the route at the specified index from this group.

Parameters
index int: index of the route to remove

requestSetVolume

Added in API level 16
void requestSetVolume (int volume)

Request a volume change for this route.

Parameters
volume int: value between 0 and getVolumeMax

requestUpdateVolume

Added in API level 16
void requestUpdateVolume (int direction)

Request an incremental volume update for this route.

Parameters
direction int: Delta to apply to the current volume

setIconDrawable

Added in API level 16
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 Drawable: icon drawable to use to represent this group

setIconResource

Added in API level 16
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 int: Resource ID of an icon drawable to use to represent this group

toString

Added in API level 16
String toString ()

Returns a string representation of the object. In general, the 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())
 

Returns
String a string representation of the object.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.