Skip to content

Most visited

Recently visited

navigation

MediaRouter.UserRouteInfo

public static class MediaRouter.UserRouteInfo
extends MediaRouter.RouteInfo

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


Information about a route that the application may define and modify. A user route defaults to PLAYBACK_TYPE_REMOTE and PLAYBACK_VOLUME_FIXED.

See also:

Summary

Inherited constants

From class android.media.MediaRouter.RouteInfo

Public methods

RemoteControlClient getRemoteControlClient()

Retrieve the RemoteControlClient associated with this route, if one has been set.

void requestSetVolume(int volume)

Request a volume change for this route.

void requestUpdateVolume(int direction)

Request an incremental volume update for this route.

void setDescription(CharSequence description)

Set the user-visible description of this route.

void setIconDrawable(Drawable icon)

Set an icon that will be used to represent this route.

void setIconResource(int resId)

Set an icon that will be used to represent this route.

void setName(CharSequence name)

Set the user-visible name of this route.

void setName(int resId)

Set the user-visible name of this route.

void setPlaybackStream(int stream)

Defines over what stream type the media is presented.

void setPlaybackType(int type)

Defines whether playback associated with this route is "local" (PLAYBACK_TYPE_LOCAL) or "remote" (PLAYBACK_TYPE_REMOTE).

void setRemoteControlClient(RemoteControlClient rcc)

Set the RemoteControlClient responsible for reporting playback info for this user route.

void setStatus(CharSequence status)

Set the current user-visible status for this route.

void setVolume(int volume)

Defines at what volume the playback associated with this route is performed (for user feedback purposes).

void setVolumeCallback(MediaRouter.VolumeCallback vcb)

Set a callback to be notified of volume update requests

void setVolumeHandling(int volumeHandling)

Defines whether volume for the playback associated with this route is fixed (PLAYBACK_VOLUME_FIXED) or can modified (PLAYBACK_VOLUME_VARIABLE).

void setVolumeMax(int volumeMax)

Defines the maximum volume at which the playback associated with this route is performed (for user feedback purposes).

Inherited methods

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

Public methods

getRemoteControlClient

Added in API level 16
RemoteControlClient getRemoteControlClient ()

Retrieve the RemoteControlClient associated with this route, if one has been set.

Returns
RemoteControlClient the RemoteControlClient associated with this route

See also:

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

setDescription

Added in API level 18
void setDescription (CharSequence description)

Set the user-visible description of this route.

The route description describes the kind of destination represented by the route. It may be a user-supplied string, a model number or brand of device.

Parameters
description CharSequence: The description of the route, or null if none.

setIconDrawable

Added in API level 16
void setIconDrawable (Drawable icon)

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

Parameters
icon Drawable: icon drawable to use to represent this route

setIconResource

Added in API level 16
void setIconResource (int resId)

Set an icon that will be used to represent this route. 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 route

setName

Added in API level 16
void setName (CharSequence name)

Set the user-visible name of this route.

Parameters
name CharSequence: Name to display to the user to describe this route

setName

Added in API level 16
void setName (int resId)

Set the user-visible name of this route.

The route name identifies the destination represented by the route. It may be a user-supplied name, an alias, or device serial number.

Parameters
resId int: Resource ID of the name to display to the user to describe this route

setPlaybackStream

Added in API level 16
void setPlaybackStream (int stream)

Defines over what stream type the media is presented.

setPlaybackType

Added in API level 16
void setPlaybackType (int type)

Defines whether playback associated with this route is "local" (PLAYBACK_TYPE_LOCAL) or "remote" (PLAYBACK_TYPE_REMOTE).

setRemoteControlClient

Added in API level 16
void setRemoteControlClient (RemoteControlClient rcc)

Set the RemoteControlClient responsible for reporting playback info for this user route.

If this route manages remote playback, the data exposed by this RemoteControlClient will be used to reflect and update information such as route volume info in related UIs.

The RemoteControlClient must have been previously registered with registerRemoteControlClient(RemoteControlClient).

Parameters
rcc RemoteControlClient: RemoteControlClient associated with this route

setStatus

Added in API level 16
void setStatus (CharSequence status)

Set the current user-visible status for this route.

Parameters
status CharSequence: Status to display to the user to describe what the endpoint of this route is currently doing

setVolume

Added in API level 16
void setVolume (int volume)

Defines at what volume the playback associated with this route is performed (for user feedback purposes). This information is only used when the playback is not local.

setVolumeCallback

Added in API level 16
void setVolumeCallback (MediaRouter.VolumeCallback vcb)

Set a callback to be notified of volume update requests

setVolumeHandling

Added in API level 16
void setVolumeHandling (int volumeHandling)

Defines whether volume for the playback associated with this route is fixed (PLAYBACK_VOLUME_FIXED) or can modified (PLAYBACK_VOLUME_VARIABLE).

setVolumeMax

Added in API level 16
void setVolumeMax (int volumeMax)

Defines the maximum volume at which the playback associated with this route is performed (for user feedback purposes). This information is only used when the playback is not local.

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.