MediaRouterParams


class MediaRouterParams


MediaRouterParams are used in MediaRouter to denote routing functionality and UI types.

Summary

Nested types

Builder class for MediaRouterParams.

Constants

const Int

A dialog type used for default if not set.

const Int

A dialog type supporting dynamic group.

const String!
ENABLE_GROUP_VOLUME_UX = "androidx.mediarouter.media.MediaRouterParams.ENABLE_GROUP_VOLUME_UX"

Bundle key used for enabling group volume UX.

Public functions

Int

Gets the media route controller dialog type.

Boolean

Gets whether declared MediaTransferReceiver is enabled.

Boolean

Gets whether the output switcher dialog is enabled.

Boolean

Returns whether transferring media from remote to local is enabled.

Constants

DIALOG_TYPE_DEFAULT

Added in 1.2.0
const val DIALOG_TYPE_DEFAULT = 1: Int

A dialog type used for default if not set. androidx.mediarouter.app.MediaRouteChooserDialog and androidx.mediarouter.app.MediaRouteControllerDialog will be shown

DIALOG_TYPE_DYNAMIC_GROUP

Added in 1.2.0
const val DIALOG_TYPE_DYNAMIC_GROUP = 2: Int

A dialog type supporting dynamic group. Users can dynamically group and ungroup route devices via this type of route dialog when the selected routes are from a MediaRouteProvider that supports dynamic group.

ENABLE_GROUP_VOLUME_UX

Added in 1.3.0
const val ENABLE_GROUP_VOLUME_UX = "androidx.mediarouter.media.MediaRouterParams.ENABLE_GROUP_VOLUME_UX": String!

Bundle key used for enabling group volume UX. The default value is true. To disable the group volume UX, set the value false.

TYPE: boolean

Public functions

getDialogType

Added in 1.2.0
fun getDialogType(): Int

Gets the media route controller dialog type.

See also
setDialogType

isMediaTransferReceiverEnabled

Added in 1.3.0
fun isMediaTransferReceiverEnabled(): Boolean

Gets whether declared MediaTransferReceiver is enabled.

isOutputSwitcherEnabled

Added in 1.2.0
fun isOutputSwitcherEnabled(): Boolean

Gets whether the output switcher dialog is enabled.

Note that it always returns false for Android versions earlier than Android R.

isTransferToLocalEnabled

Added in 1.2.0
fun isTransferToLocalEnabled(): Boolean

Returns whether transferring media from remote to local is enabled.

Note that it always returns false for Android versions earlier than Android R.