Added in API level 16

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

open Unit

open Unit

Set the user-visible description of this route.

open Unit

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

open Unit

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

open Unit

Set the user-visible name of this route.

open Unit
setName(resId: Int)

Set the user-visible name of this route.

open Unit

Defines over what stream type the media is presented.

open Unit

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

open Unit

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

open Unit

Set the current user-visible status for this route.

open Unit
setVolume(volume: Int)

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 (RouteInfo#PLAYBACK_VOLUME_FIXED) or can modified (RouteInfo#PLAYBACK_VOLUME_VARIABLE).

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

Added in API level 16
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

Added in API level 16
open fun requestSetVolume(volume: Int): Unit
Parameters
volume Int: value between 0 and getVolumeMax

requestUpdateVolume

Added in API level 16
open fun requestUpdateVolume(direction: Int): Unit
Parameters
direction Int: Delta to apply to the current volume

setDescription

Added in API level 18
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

Added in API level 16
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

Added in API level 16
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

Added in API level 16
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

setName

Added in API level 16
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

setPlaybackStream

Added in API level 16
open fun setPlaybackStream(stream: Int): Unit

Defines over what stream type the media is presented.

Parameters
stream Int:

setPlaybackType

Added in API level 16
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

Added in API level 16
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

Added in API level 16
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

Added in API level 16
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

Added in API level 16
open fun setVolumeCallback(vcb: MediaRouter.VolumeCallback!): Unit

Set a callback to be notified of volume update requests

Parameters
vcb MediaRouter.VolumeCallback!:

setVolumeHandling

Added in API level 16
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

Added in API level 16
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: