java.lang.Object | |
↳ | android.media.MediaRouter.RouteInfo |
Known Direct Subclasses |
Information about a media route.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | PLAYBACK_TYPE_LOCAL | The default playback type, "local", indicating the presentation of the media is happening on the same device (e.g. | |||||||||
int | PLAYBACK_TYPE_REMOTE | A playback type indicating the presentation of the media is happening on a different device (i.e. | |||||||||
int | PLAYBACK_VOLUME_FIXED | Playback information indicating the playback volume is fixed, i.e. | |||||||||
int | PLAYBACK_VOLUME_VARIABLE | Playback information indicating the playback volume is variable and can be controlled from this object. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the user-visible description of the route.
| |||||||||||
Get the icon representing this route.
| |||||||||||
Return the properly localized/resource user-visible name of this route.
| |||||||||||
Gets the user-visible name of the route.
| |||||||||||
Gets the
Display that should be used by the application to show
a Presentation on an external display when this route is selected. | |||||||||||
Return the current volume for this route.
| |||||||||||
Returns true if the route is in the process of connecting and is not
yet ready for use.
| |||||||||||
Returns true if this route is enabled and may be selected.
| |||||||||||
Request a volume change for this route.
| |||||||||||
Request an incremental volume update for this route.
| |||||||||||
Set an application-specific tag object for this route.
| |||||||||||
Returns a string containing a concise, human-readable description of this
object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The default playback type, "local", indicating the presentation of the media is happening on the same device (e.g. a phone, a tablet) as where it is controlled from.
A playback type indicating the presentation of the media is happening on a different device (i.e. the remote device) than where it is controlled from.
Playback information indicating the playback volume is fixed, i.e. it cannot be controlled from this object. An example of fixed playback volume is a remote player, playing over HDMI where the user prefers to control the volume on the HDMI sink, rather than attenuate at the source.
Playback information indicating the playback volume is variable and can be controlled from this object.
Gets the user-visible description of the 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.
Get the icon representing this route. This icon will be used in picker UIs if available.
Return the properly localized/resource 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.
context | Context used to resolve the correct configuration to load |
---|
Gets the user-visible name of the route.
The route name identifies the destination represented by the route. It may be a user-supplied name, an alias, or device serial number.
Gets the Display
that should be used by the application to show
a Presentation
on an external display when this route is selected.
Depending on the route, this may only be valid if the route is currently
selected.
The preferred presentation display may change independently of the route being selected or unselected. For example, the presentation display of the default system route may change when an external HDMI display is connected or disconnected even though the route itself has not changed.
This method may return null if there is no external display associated with the route or if the display is not ready to show UI yet.
The application should listen for changes to the presentation display
using the onRoutePresentationDisplayChanged(MediaRouter, MediaRouter.RouteInfo)
callback and
show or dismiss its Presentation
accordingly when the display
becomes available or is removed.
This method only makes sense for live video
routes.
Return the current volume for this route. Depending on the route, this may only be valid if the route is currently selected.
Returns true if the route is in the process of connecting and is not yet ready for use.
Returns true if this route is enabled and may be selected.
Request a volume change for this route.
volume | value between 0 and getVolumeMax |
---|
Request an incremental volume update for this route.
direction | Delta to apply to the current volume |
---|
Set an application-specific tag object for this route. The application may use this to store arbitrary data associated with the route for internal tracking.
Note that the lifespan of a route may be well past the lifespan of an Activity or other Context; take care that objects you store here will not keep more data in memory alive than you intend.
tag | Arbitrary, app-specific data for this route to hold for later use |
---|
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.