Builder

class Builder
kotlin.Any
   ↳ androidx.mediarouter.media.MediaRouteSelector.Builder

Builder for media route selectors.

Summary

Public constructors

Creates an empty media route selector builder.

Creates a media route selector descriptor builder whose initial contents are copied from an existing selector.

Public methods
MediaRouteSelector.Builder

Adds the contents of an existing media route selector to the builder.

MediaRouteSelector.Builder

Adds a list of media control categories to the builder.

MediaRouteSelector.Builder

Adds a media control category to the builder.

MediaRouteSelector

Builds the media route selector.

Public constructors

<init>

Builder()

Creates an empty media route selector builder.

<init>

Builder(selector: MediaRouteSelector)

Creates a media route selector descriptor builder whose initial contents are copied from an existing selector.

Public methods

addSelector

fun addSelector(selector: MediaRouteSelector): MediaRouteSelector.Builder

Adds the contents of an existing media route selector to the builder.

Parameters
selector MediaRouteSelector: The media route selector whose contents are to be added.
Return
MediaRouteSelector.Builder: The builder instance for chaining.

addControlCategories

fun addControlCategories(categories: MutableCollection<String!>): MediaRouteSelector.Builder

Adds a list of media control categories to the builder.

Parameters
categories MutableCollection<String!>: The list categories to add to the set of desired capabilities, such as MediaControlIntent#CATEGORY_LIVE_AUDIO.
Return
MediaRouteSelector.Builder: The builder instance for chaining.

addControlCategory

fun addControlCategory(category: String): MediaRouteSelector.Builder

Adds a media control category to the builder.

Parameters
category String: The category to add to the set of desired capabilities, such as MediaControlIntent#CATEGORY_LIVE_AUDIO.
Return
MediaRouteSelector.Builder: The builder instance for chaining.

build

fun build(): MediaRouteSelector

Builds the media route selector.