MediaRouter.GroupRouteInfo


class MediaRouter.GroupRouteInfo : MediaRouter.RouteInfo


Provides information about a media route that represents a dynamic group.

Summary

Constants

const Int

Adding a route to a dynamic group has failed because the route is already in the group.

const Int

Adding a route to a dynamic group has failed because the group route is a connected route but there is no available route connection for adding a route.

const Int

Adding a route to a dynamic group has failed because the route is not groupable.

const Int

Adding a route to a dynamic group has failed because the group route doesn't support adding a route.

const Int

The addRoute has added a route to the dynamic group.

const Int

Removing a route from a dynamic group has failed because the route is the last route in the group.

const Int

Removing a route from a dynamic group has failed because the group route is a connected route but there is no available route connection for removing a route.

const Int

Removing a route from a dynamic group has failed because the route isn't in the group.

const Int

Removing a route from a dynamic group has failed because the route is not unselectable.

const Int

Removing a route from a dynamic group has failed because the group route doesn't support removing a route.

const Int

The removeRoute has removed a route from the dynamic group.

const Int

Updating routes for a dynamic group has failed because the group route is a connected route but there is no available route connection for updating routes.

const Int

Updating routes for a dynamic group has failed because the updated routes don't contain any transferable route.

const Int

Updating routes for a dynamic group has failed because the group route doesn't support updating routes.

const Int

The updateRoutes has updated routes for the dynamic group.

Public functions

Int

Adds the route as a member of the dynamic group if the route is groupable.

(Mutable)List<MediaRouter.RouteInfo!>

Returns the list of RouteInfos of the given dynamic group route.

Int

Gets the selection state of the route when the route is in the dynamic group or NOT_IN_GROUP when the route isn't in the dynamic group.

Boolean

Returns true if this route is currently connected.

Boolean

Returns true if the route is groupable and can be added to the dynamic group with the addRoute method.

Boolean

Returns true if the route is transferable and can be updated for the dynamic group with the updateRoutes method.

Boolean

Returns true if the route is in the dynamic group and is unselectable from the dynamic group with the removeRoute method.

Int

Removes the route from the dynamic group if the route is unselectable.

Int

Updates the routes to be members of the dynamic group if the routes are transferable.

Inherited Constants

From androidx.mediarouter.media.MediaRouter.RouteInfo
const Int

A connection state indicating the route is connected.

const Int

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

const Int

The default connection state indicating the route is disconnected.

const Int

A receiver device type indicating that the presentation of the media is happening on an Audio/Video receiver (AVR).

const Int

A receiver device type indicating the presentation of the media is happening on a Bluetooth Low Energy (BLE) HEADSET.

const Int

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

const Int

A receiver device type indicating the presentation of the media is happening on a speaker system (i.e. a mono speaker or stereo speakers) built into the device.

const Int

A receiver device type indicating that the presentation of the media is happening on a car.

const Int

A receiver device type indicating that the presentation of the media is happening on a computer.

const Int

A receiver device type indicating the presentation of the media is happening on an audio device associated on a dock.

const Int

A receiver device type indicating that the presentation of the media is happening on a gaming console.

const Int

A receiver device type indicating that the presentation of the media is happening on a group of devices.

const Int

A receiver device type indicating the presentation of the media is happening on an HDMI connection.

const Int

A receiver device type indicating the presentation of the media is happening on an Audio Return Channel of an HDMI connection

const Int

A receiver device type indicating the presentation of the media is happening on an Enhanced Audio Return Channel of an HDMI connection

const Int

A receiver device type indicating the presentation of the media is happening on a hearing aid device.

const Int

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

const Int

A receiver device type indicating that the presentation of the media is happening on a smartphone.

const Int

A receiver device type indicating that the presentation of the media is happening on a smartwatch.

const Int

This property is deprecated.

use DEVICE_TYPE_BUILTIN_SPEAKER and DEVICE_TYPE_REMOTE_SPEAKER instead.

const Int

A receiver device type indicating that the presentation of the media is happening on a tablet.

const Int

A receiver device type indicating that the presentation of the media is happening on a docked tablet.

const Int

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

const Int

A receiver device type indicating the presentation of the media is happening on a USB audio device in accessory mode.

const Int

A receiver device type indicating the presentation of the media is happening on a USB audio device.

const Int

A receiver device type indicating the presentation of the media is happening on a USB audio headset.

const Int

A receiver device type indicating the presentation of the media is happening on a pair of wired headphones.

const Int

A receiver device type indicating the presentation of the media is happening on a headset, which is the combination of a headphones and a microphone.

const Int

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.

const Int

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.

const Int

Playback information indicating the playback volume is fixed, i.e. it cannot be controlled from this object.

const Int

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

Inherited functions

From androidx.mediarouter.media.MediaRouter.RouteInfo
Boolean

Gets whether this route supports disconnecting without interrupting playback.

Unit

Connects this route without selecting it.

Unit

Disconnects this route.

Int

Gets the connection state of the route.

(Mutable)List<IntentFilter!>

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

String?

Gets the user-visible description of the route.

Int

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

Bundle?

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

Uri?

Gets the URI of the icon representing this route.

String

Gets the unique id of the route.

MediaRouteDescriptor?

Returns the MediaRouteDescriptor of this media route info or null if it is not updated by its provider yet.

String

Gets the user-visible name of the route.

Int

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

Int

Gets the type of playback associated with this route.

Display?

Gets the Display that should be used by the application to show a android.app.Presentation on an external display when this route is selected.

MediaRouter.ProviderInfo

Gets information about the provider of this media route.

IntentSender?

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

Int

Gets the current volume for this route.

Int

Gets information about how volume is handled on the route.

Int

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

Boolean

Returns true if this route is a bluetooth route.

Boolean

This function is deprecated.

use getConnectionState instead.

Boolean

Returns true if this route is the default route.

Boolean

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

Boolean

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

Boolean

Returns true if this route is currently selected.

Boolean

Returns true if this route is a system route.

Boolean

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

Unit

Requests a volume change for this route asynchronously.

Unit

Requests an incremental volume update for this route asynchronously.

Unit

Selects this media route.

Unit

Sends a media control request to be performed asynchronously by the route's destination.

Boolean

Returns true if the route supports the specified media control category and action.

Boolean

Returns true if the route supports the specified media control category.

Boolean

Returns true if the route supports the specified media control request.

String

Constants

ADD_ROUTE_FAILED_REASON_ALREADY_IN_GROUP

Added in 1.8.0-alpha02
const val ADD_ROUTE_FAILED_REASON_ALREADY_IN_GROUP = 3: Int

Adding a route to a dynamic group has failed because the route is already in the group.

See also
addRoute

ADD_ROUTE_FAILED_REASON_NOT_AVAILABLE_ROUTE_CONNECTION

Added in 1.8.0-alpha02
const val ADD_ROUTE_FAILED_REASON_NOT_AVAILABLE_ROUTE_CONNECTION = 5: Int

Adding a route to a dynamic group has failed because the group route is a connected route but there is no available route connection for adding a route.

See also
addRoute

ADD_ROUTE_FAILED_REASON_NOT_GROUPABLE

Added in 1.8.0-alpha02
const val ADD_ROUTE_FAILED_REASON_NOT_GROUPABLE = 2: Int

Adding a route to a dynamic group has failed because the route is not groupable.

See also
addRoute

ADD_ROUTE_FAILED_REASON_UNSUPPORTED_FOR_GROUP_ROUTE

Added in 1.8.0-alpha02
const val ADD_ROUTE_FAILED_REASON_UNSUPPORTED_FOR_GROUP_ROUTE = 4: Int

Adding a route to a dynamic group has failed because the group route doesn't support adding a route.

See also
addRoute

ADD_ROUTE_SUCCESSFUL

Added in 1.8.0-alpha02
const val ADD_ROUTE_SUCCESSFUL = 1: Int

The addRoute has added a route to the dynamic group.

See also
addRoute

REMOVE_ROUTE_FAILED_REASON_LAST_ROUTE_IN_GROUP

Added in 1.8.0-alpha02
const val REMOVE_ROUTE_FAILED_REASON_LAST_ROUTE_IN_GROUP = 4: Int

Removing a route from a dynamic group has failed because the route is the last route in the group.

See also
removeRoute

REMOVE_ROUTE_FAILED_REASON_NOT_AVAILABLE_ROUTE_CONNECTION

Added in 1.8.0-alpha02
const val REMOVE_ROUTE_FAILED_REASON_NOT_AVAILABLE_ROUTE_CONNECTION = 6: Int

Removing a route from a dynamic group has failed because the group route is a connected route but there is no available route connection for removing a route.

See also
removeRoute

REMOVE_ROUTE_FAILED_REASON_NOT_IN_GROUP

Added in 1.8.0-alpha02
const val REMOVE_ROUTE_FAILED_REASON_NOT_IN_GROUP = 3: Int

Removing a route from a dynamic group has failed because the route isn't in the group.

See also
removeRoute

REMOVE_ROUTE_FAILED_REASON_NOT_UNSELECTABLE

Added in 1.8.0-alpha02
const val REMOVE_ROUTE_FAILED_REASON_NOT_UNSELECTABLE = 2: Int

Removing a route from a dynamic group has failed because the route is not unselectable.

See also
removeRoute

REMOVE_ROUTE_FAILED_REASON_UNSUPPORTED_FOR_GROUP_ROUTE

Added in 1.8.0-alpha02
const val REMOVE_ROUTE_FAILED_REASON_UNSUPPORTED_FOR_GROUP_ROUTE = 5: Int

Removing a route from a dynamic group has failed because the group route doesn't support removing a route.

See also
removeRoute

REMOVE_ROUTE_SUCCESSFUL

Added in 1.8.0-alpha02
const val REMOVE_ROUTE_SUCCESSFUL = 1: Int

The removeRoute has removed a route from the dynamic group.

See also
removeRoute

UPDATE_ROUTES_FAILED_REASON_NOT_AVAILABLE_ROUTE_CONNECTION

Added in 1.8.0-alpha02
const val UPDATE_ROUTES_FAILED_REASON_NOT_AVAILABLE_ROUTE_CONNECTION = 4: Int

Updating routes for a dynamic group has failed because the group route is a connected route but there is no available route connection for updating routes.

See also
updateRoutes

UPDATE_ROUTES_FAILED_REASON_NOT_TRANSFERABLE

Added in 1.8.0-alpha02
const val UPDATE_ROUTES_FAILED_REASON_NOT_TRANSFERABLE = 2: Int

Updating routes for a dynamic group has failed because the updated routes don't contain any transferable route.

See also
updateRoutes

UPDATE_ROUTES_FAILED_REASON_UNSUPPORTED_FOR_GROUP_ROUTE

Added in 1.8.0-alpha02
const val UPDATE_ROUTES_FAILED_REASON_UNSUPPORTED_FOR_GROUP_ROUTE = 3: Int

Updating routes for a dynamic group has failed because the group route doesn't support updating routes.

See also
updateRoutes

UPDATE_ROUTES_SUCCESSFUL

Added in 1.8.0-alpha02
const val UPDATE_ROUTES_SUCCESSFUL = 1: Int

The updateRoutes has updated routes for the dynamic group.

See also
updateRoutes

Public functions

addRoute

Added in 1.8.0-alpha02
@MainThread
fun addRoute(route: MediaRouter.RouteInfo): Int

Adds the route as a member of the dynamic group if the route is groupable.

If the route is not groupable or is already in the dynamic group, then adding it to the dynamic group will do nothing.

Returns
Int

The state of adding a route to the dynamic group.

See also
isGroupable

getRoutesInGroup

Added in 1.8.0-alpha02
fun getRoutesInGroup(): (Mutable)List<MediaRouter.RouteInfo!>

Returns the list of RouteInfos of the given dynamic group route.

getSelectionState

Added in 1.8.0-alpha02
fun getSelectionState(route: MediaRouter.RouteInfo): Int

Gets the selection state of the route when the route is in the dynamic group or NOT_IN_GROUP when the route isn't in the dynamic group.

isConnected

Added in 1.8.0-alpha02
@MainThread
fun isConnected(): Boolean

Returns true if this route is currently connected.

Must be called on the main thread.

Returns
Boolean

True if this route is currently connected

isGroupable

Added in 1.8.0-alpha02
fun isGroupable(route: MediaRouter.RouteInfo): Boolean

Returns true if the route is groupable and can be added to the dynamic group with the addRoute method.

isTransferable

Added in 1.8.0-alpha02
fun isTransferable(route: MediaRouter.RouteInfo): Boolean

Returns true if the route is transferable and can be updated for the dynamic group with the updateRoutes method.

isUnselectable

Added in 1.8.0-alpha02
fun isUnselectable(route: MediaRouter.RouteInfo): Boolean

Returns true if the route is in the dynamic group and is unselectable from the dynamic group with the removeRoute method.

removeRoute

Added in 1.8.0-alpha02
@MainThread
fun removeRoute(route: MediaRouter.RouteInfo): Int

Removes the route from the dynamic group if the route is unselectable.

If the route is not unselectable, not in the dynamic group, or is the last route of the dynamic group, then removing it from the dynamic group will do nothing.

Returns
Int

The state of removing a route from the dynamic group.

See also
isUnselectable

updateRoutes

Added in 1.8.0-alpha02
@MainThread
fun updateRoutes(routes: (Mutable)List<MediaRouter.RouteInfo!>): Int

Updates the routes to be members of the dynamic group if the routes are transferable. Non-transferable routes will not be included in the dynamic group.

Returns
Int

The state of updating routes for the dynamic group.

See also
isTransferable