MediaRouterParams

public class MediaRouterParams
extends Object

java.lang.Object
   ↳ androidx.mediarouter.media.MediaRouterParams


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

Summary

Nested classes

class MediaRouterParams.Builder

Builder class for MediaRouterParams

Constants

int DIALOG_TYPE_DEFAULT

A dialog type used for default if not set.

int DIALOG_TYPE_DYNAMIC_GROUP

A dialog type supporting dynamic group.

String ENABLE_GROUP_VOLUME_UX

Bundle key used for enabling group volume UX.

Public methods

int getDialogType()

Gets the media route controller dialog type.

boolean isMediaTransferReceiverEnabled()

Gets whether declared MediaTransferReceiver is enabled.

boolean isOutputSwitcherEnabled()

Gets whether the output switcher dialog is enabled.

boolean isTransferToLocalEnabled()

Returns whether transferring media from remote to local is enabled.

Inherited methods

Constants

DIALOG_TYPE_DEFAULT

public static final int DIALOG_TYPE_DEFAULT

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

Constant Value: 1 (0x00000001)

DIALOG_TYPE_DYNAMIC_GROUP

public static final int DIALOG_TYPE_DYNAMIC_GROUP

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.

Constant Value: 2 (0x00000002)

ENABLE_GROUP_VOLUME_UX

public static final String ENABLE_GROUP_VOLUME_UX

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

Constant Value: "androidx.mediarouter.media.MediaRouterParams.ENABLE_GROUP_VOLUME_UX"

Public methods

getDialogType

public int getDialogType ()

Gets the media route controller dialog type.

Returns
int

isMediaTransferReceiverEnabled

public boolean isMediaTransferReceiverEnabled ()

Gets whether declared MediaTransferReceiver is enabled.

Returns
boolean

isOutputSwitcherEnabled

public boolean isOutputSwitcherEnabled ()

Gets whether the output switcher dialog is enabled.

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

Returns
boolean

isTransferToLocalEnabled

public boolean isTransferToLocalEnabled ()

Returns whether transferring media from remote to local is enabled.

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

Returns
boolean