Builder
class Builder
kotlin.Any | |
↳ | androidx.mediarouter.media.MediaRouteDescriptor.Builder |
Builder for media route descriptors
.
Summary
Public constructors | |
---|---|
Creates a media route descriptor builder. |
|
<init>(descriptor: MediaRouteDescriptor!) Creates a media route descriptor builder whose initial contents are copied from an existing descriptor. |
Public methods | |
---|---|
MediaRouteDescriptor.Builder! |
addControlFilter(filter: IntentFilter!) Adds a |
MediaRouteDescriptor.Builder! |
addControlFilters(filters: MutableCollection<IntentFilter!>!) Adds a list of |
MediaRouteDescriptor! |
build() Builds the |
MediaRouteDescriptor.Builder! |
setCanDisconnect(canDisconnect: Boolean) Sets whether the route can be disconnected without stopping playback. |
MediaRouteDescriptor.Builder! |
setConnecting(connecting: Boolean) Sets whether the route is in the process of connecting and is not yet ready for use. |
MediaRouteDescriptor.Builder! |
setConnectionState(connectionState: Int) Sets the route's connection state. |
MediaRouteDescriptor.Builder! |
setDescription(description: String!) Sets the user-visible description of the route. |
MediaRouteDescriptor.Builder! |
setDeviceType(deviceType: Int) Sets the route's receiver device type. |
MediaRouteDescriptor.Builder! |
setEnabled(enabled: Boolean) Sets whether the route is enabled. |
MediaRouteDescriptor.Builder! |
Sets a bundle of extras for this route descriptor. |
MediaRouteDescriptor.Builder! |
setIconUri(iconUri: Uri!) Sets the URI of the icon representing this route. |
MediaRouteDescriptor.Builder! |
Sets the unique id of the route. |
MediaRouteDescriptor.Builder! |
setIsDynamicGroupRoute(isDynamicGroupRoute: Boolean) Sets whether the route is a dynamic group route. |
MediaRouteDescriptor.Builder! |
Sets the user-visible name of the route. |
MediaRouteDescriptor.Builder! |
setPlaybackStream(playbackStream: Int) Sets the route's playback stream. |
MediaRouteDescriptor.Builder! |
setPlaybackType(playbackType: Int) Sets the route's playback type. |
MediaRouteDescriptor.Builder! |
setPresentationDisplayId(presentationDisplayId: Int) Sets the route's presentation display id, or -1 if none. |
MediaRouteDescriptor.Builder! |
Sets an intent sender for launching the settings activity for this route. |
MediaRouteDescriptor.Builder! |
Sets the route's current volume, or 0 if unknown. |
MediaRouteDescriptor.Builder! |
setVolumeHandling(volumeHandling: Int) Sets the route's volume handling. |
MediaRouteDescriptor.Builder! |
setVolumeMax(volumeMax: Int) Sets the route's maximum volume, or 0 if unknown. |
Public constructors
<init>
Builder(
id: String!,
name: String!)
Creates a media route descriptor builder.
Parameters | |
---|---|
id |
String!: The unique id of the route. |
name |
String!: The user-visible name of the route. |
<init>
Builder(descriptor: MediaRouteDescriptor!)
Creates a media route descriptor builder whose initial contents are copied from an existing descriptor.
Public methods
addControlFilter
fun addControlFilter(filter: IntentFilter!): MediaRouteDescriptor.Builder!
Adds a media control intent
filter for the route.
addControlFilters
fun addControlFilters(filters: MutableCollection<IntentFilter!>!): MediaRouteDescriptor.Builder!
Adds a list of media control intent
filters for the route.