Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

belongs to Maven artifact androidx.mediarouter:mediarouter:1.0.0-alpha5

MediaRouteSelector.Builder

public static final class MediaRouteSelector.Builder
extends Object

java.lang.Object
   ↳ androidx.mediarouter.media.MediaRouteSelector.Builder


Builder for media route selectors.

Summary

Public constructors

MediaRouteSelector.Builder()

Creates an empty media route selector builder.

MediaRouteSelector.Builder(MediaRouteSelector selector)

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

Public methods

MediaRouteSelector.Builder addControlCategories(Collection<String> categories)

Adds a list of media control categories to the builder.

MediaRouteSelector.Builder addControlCategory(String category)

Adds a media control category to the builder.

MediaRouteSelector.Builder addSelector(MediaRouteSelector selector)

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

MediaRouteSelector build()

Builds the media route selector.

Inherited methods

Public constructors

MediaRouteSelector.Builder

public MediaRouteSelector.Builder ()

Creates an empty media route selector builder.

MediaRouteSelector.Builder

public MediaRouteSelector.Builder (MediaRouteSelector selector)

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

Parameters
selector MediaRouteSelector

Public methods

addControlCategories

public MediaRouteSelector.Builder addControlCategories (Collection<String> categories)

Adds a list of media control categories to the builder.

Parameters
categories Collection: The list categories to add to the set of desired capabilities, such as MediaControlIntent.CATEGORY_LIVE_AUDIO.

Returns
MediaRouteSelector.Builder The builder instance for chaining.

addControlCategory

public MediaRouteSelector.Builder addControlCategory (String category)

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.

Returns
MediaRouteSelector.Builder The builder instance for chaining.

addSelector

public MediaRouteSelector.Builder addSelector (MediaRouteSelector selector)

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.

Returns
MediaRouteSelector.Builder The builder instance for chaining.

build

public MediaRouteSelector build ()

Builds the media route selector.

Returns
MediaRouteSelector