MediaRouter.RouteInfo

public static class MediaRouter.RouteInfo
extends Object

java.lang.Object
   ↳ androidx.mediarouter.media.MediaRouter.RouteInfo


Provides information about a media route.

Each media route has a list of media control intent filters that describe the capabilities of the route and the manner in which it is used and controlled.

Summary

Constants

int CONNECTION_STATE_CONNECTED

A connection state indicating the route is connected.

int CONNECTION_STATE_CONNECTING

A connection state indicating the route is in the process of connecting and is not yet ready for use.

int CONNECTION_STATE_DISCONNECTED

The default connection state indicating the route is disconnected.

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 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

boolean canDisconnect()

Gets whether this route supports disconnecting without interrupting playback.

int getConnectionState()

Gets the connection state of the route.

List<IntentFilter> getControlFilters()

Gets a list of media control intent filters that describe the capabilities of this route and the media control actions that it supports.

String getDescription()

Gets the user-visible description of the route.

int getDeviceType()

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

Bundle getExtras()

Gets a collection of extra properties about this route that were supplied by its media route provider, or null if none.

Uri getIconUri()

Gets the URI of the icon representing this route.

String getId()

Gets the unique id of the route.

String getName()

Gets the user-visible name of the route.

int getPlaybackStream()

Gets the audio stream over which the playback associated with this route is performed.

int getPlaybackType()

Gets the type of playback associated with this route.

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.

MediaRouter.ProviderInfo getProvider()

Gets information about the provider of this media route.

IntentSender getSettingsIntent()

Gets an intent sender for launching a settings activity for this route.

int getVolume()

Gets the current volume for this route.

int getVolumeHandling()

Gets information about how volume is handled on the route.

int getVolumeMax()

Gets the maximum volume at which the playback associated with this route is performed.

boolean isBluetooth()

Returns true if this route is a bluetooth route.

boolean isConnecting()

This method is deprecated. use getConnectionState() instead.

boolean isDefault()

Returns true if this route is the default route.

boolean isDeviceSpeaker()

Returns true if this route is the default route and the device speaker.

boolean isEnabled()

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

boolean isSelected()

Returns true if this route is currently selected.

boolean matchesSelector(MediaRouteSelector selector)

Returns true if the route supports at least one of the capabilities described by a media route selector.

void requestSetVolume(int volume)

Requests a volume change for this route asynchronously.

void requestUpdateVolume(int delta)

Requests an incremental volume update for this route asynchronously.

void select()

Selects this media route.

void sendControlRequest(Intent intent, MediaRouter.ControlRequestCallback callback)

Sends a