The Android Developer Challenge is back! Submit your idea before December 2.

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.

<init>(@NonNull selector: MediaRouteSelector)

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

Public methods

MediaRouteSelector.Builder

Adds a list of media control categories to the builder.

MediaRouteSelector.Builder
addControlCategory(@NonNull category: String)

Adds a media control category to the builder.

MediaRouteSelector.Builder
addSelector(@NonNull selector: MediaRouteSelector)

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

MediaRouteSelector

Builds the media route selector.

Public constructors

<init>

Builder()

Creates an empty media route selector builder.

<init>

Builder(@NonNull selector: MediaRouteSelector)

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

Public methods

addControlCategories

@NonNull fun addControlCategories(@NonNull 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

@NonNull fun addControlCategory(@NonNull 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.

addSelector

@NonNull fun addSelector(@NonNull 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.

build

@NonNull fun build(): MediaRouteSelector

Builds the media route selector.