Google 致力于为黑人社区推动种族平等。查看具体举措

MediaRouterParams

open class MediaRouterParams
kotlin.Any
   ↳ androidx.mediarouter.media.MediaRouterParams

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

Summary

Nested classes

Builder class for MediaRouterParams.

Constants
static Int

A dialog type used for default if not set.

static Int

A dialog type supporting dynamic group.

Public methods
open Int

Gets the media route controller dialog type.

open Boolean

Gets whether the output switcher dialog is enabled.

open Boolean

Returns whether transferring media from remote to local is enabled.

Constants

DIALOG_TYPE_DEFAULT

static val DIALOG_TYPE_DEFAULT: Int

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

Value: 1

DIALOG_TYPE_DYNAMIC_GROUP

static val DIALOG_TYPE_DYNAMIC_GROUP: 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.

Value: 2

Public methods

getDialogType

open fun getDialogType(): Int

Gets the media route controller dialog type.

isOutputSwitcherEnabled

open 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

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