# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Methods | Inherited Methods

# MediaRouter.RouteInfo

`public static class MediaRouter.RouteInfo`
`extends Object` ``

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

Known direct subclasses MediaRouter.RouteGroup, MediaRouter.UserRouteInfo
MediaRouter.RouteGroup | Information about a route that consists of multiple other routes in a group.
MediaRouter.UserRouteInfo | Information about a route that the application may define and modify.

Information about a media route.

## Summary

### Constants
`int` | `DEVICE_TYPE_BLUETOOTH` A receiver device type of the route indicating the presentation of the media is happening on a bluetooth device such as a bluetooth speaker.
`int` | `DEVICE_TYPE_SPEAKER` A receiver device type of the route indicating the presentation of the media is happening on a speaker.
`int` | `DEVICE_TYPE_TV` A receiver device type of the route indicating the presentation of the media is happening on a TV.
`int` | `DEVICE_TYPE_UNKNOWN` The default receiver device type of the route indicating the type is unknown.
`int` | `PLAYBACK_TYPE_LOCAL` 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.
`int` | `PLAYBACK_TYPE_REMOTE` 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.
`int` | `PLAYBACK_VOLUME_FIXED` Playback information indicating the playback volume is fixed, i.e. it cannot be controlled from this object.
`int` | `PLAYBACK_VOLUME_VARIABLE` Playback information indicating the playback volume is variable and can be controlled from this object.

### Public methods
`MediaRouter.RouteCategory` | `getCategory()`
`CharSequence` | `getDescription()` Gets the user-visible description of the route.
`int` | `getDeviceType()` Gets the type of the receiver device associated with this route.
`MediaRouter.RouteGroup` | `getGroup()`
`Drawable` | `getIconDrawable()` Get the icon representing this route.
`CharSequence` | `getName(Context context)` Return the properly localized/resource user-visible name of this route.
`CharSequence` | `getName()` Gets the user-visible name of the route.
`int` | `getPlaybackStream()`
`int` | `getPlaybackType()`
`Display` | `getPresentationDisplay()` Gets the `Display` that should be used by the application to show a `Presentation` on an external display when this route is selected.
`CharSequence` | `getStatus()`
`int` | `getSupportedTypes()`
`Object` | `getTag()`
`int` | `getVolume()` Return the current volume for this route.
`int` | `getVolumeHandling()`
`int` | `getVolumeMax()`
`boolean` | `isConnecting()` Returns true if the route is in the process of connecting and is not yet ready for use.
`boolean` | `isEnabled()` Returns true if this route is enabled and may be selected.
`void` | `requestSetVolume(int volume)` Request a volume change for this route.
`void` | `requestUpdateVolume(int direction)` Request an incremental volume update for this route.
`void` | `setTag(Object tag)` Set an application-specific tag object for this route.
`String` | `toString()` Returns a string representation of the object.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### DEVICE_TYPE_BLUETOOTH

    public static final int DEVICE_TYPE_BLUETOOTH

A receiver device type of the route indicating the presentation of the media is happening on a bluetooth device such as a bluetooth speaker.

See also:

- `getDeviceType()`

Constant Value: 3 (0x00000003)

### DEVICE_TYPE_SPEAKER

    public static final int DEVICE_TYPE_SPEAKER

A receiver device type of the route indicating the presentation of the media is happening on a speaker.

See also:

- `getDeviceType()`

Constant Value: 2 (0x00000002)

### DEVICE_TYPE_TV

    public static final int DEVICE_TYPE_TV

A receiver device type of the route indicating the presentation of the media is happening on a TV.

See also:

- `getDeviceType()`

Constant Value: 1 (0x00000001)

### DEVICE_TYPE_UNKNOWN

    public static final int DEVICE_TYPE_UNKNOWN

The default receiver device type of the route indicating the type is unknown.

See also:

- `getDeviceType()`

Constant Value: 0 (0x00000000)

### PLAYBACK_TYPE_LOCAL

    public static final int PLAYBACK_TYPE_LOCAL

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.

See also:

- `getPlaybackType()`

Constant Value: 0 (0x00000000)

### PLAYBACK_TYPE_REMOTE

    public static final int PLAYBACK_TYPE_REMOTE

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.

See also:

- `getPlaybackType()`

Constant Value: 1 (0x00000001)

### PLAYBACK_VOLUME_FIXED

    public static final int PLAYBACK_VOLUME_FIXED

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.

See also:

- `getVolumeHandling()`

Constant Value: 0 (0x00000000)

### PLAYBACK_VOLUME_VARIABLE

    public static final int PLAYBACK_VOLUME_VARIABLE

Playback information indicating the playback volume is variable and can be controlled from this object.

See also:

- `getVolumeHandling()`

Constant Value: 1 (0x00000001)

## Public methods

### getCategory

    public MediaRouter.RouteCategory getCategory ()

Returns
`MediaRouter.RouteCategory` | the category this route belongs to.

### getDescription

    public CharSequence getDescription ()

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.

Returns
`CharSequence` | The description of the route, or null if none.

### getDeviceType

    public int getDeviceType ()

Gets the type of the receiver device associated with this route.

Returns
`int` | The type of the receiver device associated with this route: `DEVICE_TYPE_BLUETOOTH`, `DEVICE_TYPE_TV`, `DEVICE_TYPE_SPEAKER`, or `DEVICE_TYPE_UNKNOWN`. Value is `DEVICE_TYPE_UNKNOWN`, `DEVICE_TYPE_TV`, `DEVICE_TYPE_SPEAKER`, or `DEVICE_TYPE_BLUETOOTH`

### getGroup

    public MediaRouter.RouteGroup getGroup ()

Returns
`MediaRouter.RouteGroup` | The group that this route belongs to.

### getIconDrawable

    public Drawable getIconDrawable ()

Get the icon representing this route. This icon will be used in picker UIs if available.

Returns
`Drawable` | the icon representing this route or null if no icon is available

### getName

    public CharSequence getName (Context context)

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.

Parameters
`context` | `Context`: Context used to resolve the correct configuration to load

Returns
`CharSequence` | The user-visible name of a media route. This is the string presented to users who may select this as the active route.

### getName

    public CharSequence getName ()

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.

Returns
`CharSequence` | The user-visible name of a media route. This is the string presented to users who may select this as the active route.

### getPlaybackStream

    public int getPlaybackStream ()

Returns
`int` | the stream over which the playback associated with this route is performed

See also:

- `MediaRouter.UserRouteInfo.setPlaybackStream(int)`

### getPlaybackType

    public int getPlaybackType ()

Returns
`int` | the type of playback associated with this route Value is `PLAYBACK_TYPE_LOCAL`, or `PLAYBACK_TYPE_REMOTE`

See also:

- `MediaRouter.UserRouteInfo.setPlaybackType(int)`

### getPresentationDisplay

    public Display getPresentationDisplay ()

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 `Callback#onRoutePresentationDisplayChanged` 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.

Returns
`Display` | The preferred presentation display to use when this route is selected or null if none.

See also:

- `MediaRouter.ROUTE_TYPE_LIVE_VIDEO`
- `Presentation`

### getStatus

    public CharSequence getStatus ()

Returns
`CharSequence` | The user-visible status for a media route. This may include a description of the currently playing media, if available.

### getSupportedTypes

    public int getSupportedTypes ()

Returns
`int` | A media type flag set describing which types this route supports.

### getTag

    public Object getTag ()

Returns
`Object` | The tag object previously set by the application

See also:

- `setTag(Object)`

### getVolume

    public int getVolume ()

Return the current volume for this route. Depending on the route, this may only be valid if the route is currently selected.

Returns
`int` | the volume at which the playback associated with this route is performed

See also:

- `MediaRouter.UserRouteInfo.setVolume(int)`

### getVolumeHandling

    public int getVolumeHandling ()

Returns
`int` | how volume is handling on the route Value is `PLAYBACK_VOLUME_FIXED`, or `PLAYBACK_VOLUME_VARIABLE`

See also:

- `MediaRouter.UserRouteInfo.setVolumeHandling(int)`

### getVolumeMax

    public int getVolumeMax ()

Returns
`int` | the maximum volume at which the playback associated with this route is performed

See also:

- `MediaRouter.UserRouteInfo.setVolumeMax(int)`

### isConnecting

    public boolean isConnecting ()

Returns true if the route is in the process of connecting and is not yet ready for use.

Returns
`boolean` | True if this route is in the process of connecting.

### isEnabled

    public boolean isEnabled ()

Returns true if this route is enabled and may be selected.

Returns
`boolean` | True if this route is enabled.

### requestSetVolume

    public void requestSetVolume (int volume)

Request a volume change for this route.

Parameters
`volume` | `int`: value between 0 and getVolumeMax

### requestUpdateVolume

    public void requestUpdateVolume (int direction)

Request an incremental volume update for this route.

Parameters
`direction` | `int`: Delta to apply to the current volume

### setTag

    public void setTag (Object tag)

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.

Parameters
`tag` | `Object`: Arbitrary, app-specific data for this route to hold for later use

### toString

    public String toString ()

Returns a string representation of the object. In general, the `toString` method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The `toString` method for class `Object` returns a string consisting of the name of the class of which the object is an instance, the at-sign character ``@`', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

>      getClass().getName() + '@' + Integer.toHexString(hashCode())

Returns
`String` | a string representation of the object.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*