UserRouteInfo
open class UserRouteInfo : MediaRouter.RouteInfo
kotlin.Any | ||
↳ | android.media.MediaRouter.RouteInfo | |
↳ | android.media.MediaRouter.UserRouteInfo |
Information about a route that the application may define and modify. A user route defaults to RouteInfo.PLAYBACK_TYPE_REMOTE
and RouteInfo.PLAYBACK_VOLUME_FIXED
.
Summary
Inherited constants | |
---|---|
Public methods | |
---|---|
open RemoteControlClient! |
Retrieve the RemoteControlClient associated with this route, if one has been set. |
open Unit |
requestSetVolume(volume: Int) |
open Unit |
requestUpdateVolume(direction: Int) |
open Unit |
setDescription(description: CharSequence!) Set the user-visible description of this route. |
open Unit |
setIconDrawable(icon: Drawable!) Set an icon that will be used to represent this route. |
open Unit |
setIconResource(resId: Int) Set an icon that will be used to represent this route. |
open Unit |
Set the user-visible name of this route. |
open Unit |
setName(name: CharSequence!) Set the user-visible name of this route. |
open Unit |
setPlaybackStream(stream: Int) Defines over what stream type the media is presented. |
open Unit |
setPlaybackType(type: Int) Defines whether playback associated with this route is "local" ( |
open Unit |
Set the RemoteControlClient responsible for reporting playback info for this user route. |
open Unit |
setStatus(status: CharSequence!) Set the current user-visible status for this route. |
open Unit |
Defines at what volume the playback associated with this route is performed (for user feedback purposes). |
open Unit |
Set a callback to be notified of volume update requests |
open Unit |
setVolumeHandling(volumeHandling: Int) Defines whether volume for the playback associated with this route is fixed ( |
open Unit |
setVolumeMax(volumeMax: Int) Defines the maximum volume at which the playback associated with this route is performed (for user feedback purposes). |
Inherited functions | |
---|---|
Public methods
getRemoteControlClient
open fun getRemoteControlClient(): RemoteControlClient!
Retrieve the RemoteControlClient associated with this route, if one has been set.
Return | |
---|---|
RemoteControlClient! |
the RemoteControlClient associated with this route |
requestSetVolume
open fun requestSetVolume(volume: Int): Unit
Parameters | |
---|---|
volume |
Int: value between 0 and getVolumeMax |
requestUpdateVolume
open fun requestUpdateVolume(direction: Int): Unit
Parameters | |
---|---|
direction |
Int: Delta to apply to the current volume |
setDescription
open fun setDescription(description: CharSequence!): Unit
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
open fun setIconDrawable(icon: Drawable!): Unit
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
open fun setIconResource(resId: Int): Unit
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
open fun setName(resId: Int): Unit
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 |
setName
open fun setName(name: CharSequence!): Unit
Set the user-visible name of this route.
Parameters | |
---|---|
name |
CharSequence!: Name to display to the user to describe this route |
setPlaybackStream
open fun setPlaybackStream(stream: Int): Unit
Defines over what stream type the media is presented.
Parameters | |
---|---|
stream |
Int: |
setPlaybackType
open fun setPlaybackType(type: Int): Unit
Defines whether playback associated with this route is "local" (RouteInfo.PLAYBACK_TYPE_LOCAL
) or "remote" (RouteInfo.PLAYBACK_TYPE_REMOTE
).
Parameters | |
---|---|
type |
Int: Value is android.media.MediaRouter.RouteInfo#PLAYBACK_TYPE_LOCAL , or android.media.MediaRouter.RouteInfo#PLAYBACK_TYPE_REMOTE |
setRemoteControlClient
open fun setRemoteControlClient(rcc: RemoteControlClient!): Unit
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 AudioManager.registerRemoteControlClient(RemoteControlClient)
.
Parameters | |
---|---|
rcc |
RemoteControlClient!: RemoteControlClient associated with this route |
setStatus
open fun setStatus(status: CharSequence!): Unit
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
open fun setVolume(volume: Int): Unit
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.
Parameters | |
---|---|
volume |
Int: |
setVolumeCallback
open fun setVolumeCallback(vcb: MediaRouter.VolumeCallback!): Unit
Set a callback to be notified of volume update requests
Parameters | |
---|---|
vcb |
MediaRouter.VolumeCallback!: |
setVolumeHandling
open fun setVolumeHandling(volumeHandling: Int): Unit
Defines whether volume for the playback associated with this route is fixed (RouteInfo.PLAYBACK_VOLUME_FIXED
) or can modified (RouteInfo.PLAYBACK_VOLUME_VARIABLE
).
Parameters | |
---|---|
volumeHandling |
Int: Value is android.media.MediaRouter.RouteInfo#PLAYBACK_VOLUME_FIXED , or android.media.MediaRouter.RouteInfo#PLAYBACK_VOLUME_VARIABLE |
setVolumeMax
open fun setVolumeMax(volumeMax: Int): Unit
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.
Parameters | |
---|---|
volumeMax |
Int: |