public static class MediaRouter.UserRouteInfo extends MediaRouter.RouteInfo
MediaRouter.RouteInfo.PLAYBACK_TYPE_REMOTE
and
MediaRouter.RouteInfo.PLAYBACK_VOLUME_FIXED
.MediaRouter.RouteInfo
PLAYBACK_TYPE_LOCAL, PLAYBACK_TYPE_REMOTE, PLAYBACK_VOLUME_FIXED, PLAYBACK_VOLUME_VARIABLE, STATUS_AVAILABLE, STATUS_CONNECTING, STATUS_NONE, STATUS_NOT_AVAILABLE, STATUS_SCANNING
Modifier and Type | Method and Description |
---|---|
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 |
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"
(
MediaRouter.RouteInfo.PLAYBACK_TYPE_LOCAL ) or "remote"
(MediaRouter.RouteInfo.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
(
MediaRouter.RouteInfo.PLAYBACK_VOLUME_FIXED ) or can modified
(MediaRouter.RouteInfo.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).
|
getCategory, getGroup, getIconDrawable, getName, getName, getPlaybackStream, getPlaybackType, getPresentationDisplay, getStatus, getStatusCode, getSupportedTypes, getTag, getVolume, getVolumeHandling, getVolumeMax, isEnabled, setTag, toString
public void setName(CharSequence name)
name
- Name to display to the user to describe this routepublic void setName(int resId)
resId
- Resource ID of the name to display to the user to describe this routepublic void setStatus(CharSequence status)
status
- Status to display to the user to describe what the endpoint
of this route is currently doingpublic void setRemoteControlClient(RemoteControlClient rcc)
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
AudioManager.registerRemoteControlClient(RemoteControlClient)
.
rcc
- RemoteControlClient associated with this routepublic RemoteControlClient getRemoteControlClient()
setRemoteControlClient(RemoteControlClient)
public void setIconDrawable(Drawable icon)
icon
- icon drawable to use to represent this routepublic void setIconResource(int resId)
resId
- Resource ID of an icon drawable to use to represent this routepublic void setVolumeCallback(MediaRouter.VolumeCallback vcb)
vcb
- public void setPlaybackType(int type)
MediaRouter.RouteInfo.PLAYBACK_TYPE_LOCAL
) or "remote"
(MediaRouter.RouteInfo.PLAYBACK_TYPE_REMOTE
).type
- public void setVolumeHandling(int volumeHandling)
MediaRouter.RouteInfo.PLAYBACK_VOLUME_FIXED
) or can modified
(MediaRouter.RouteInfo.PLAYBACK_VOLUME_VARIABLE
).volumeHandling
- public void setVolume(int volume)
volume
- public 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 void setVolumeMax(int volumeMax)
volumeMax
- public void setPlaybackStream(int stream)
stream
-