public final class

MediaRouteSelector.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.mediarouter.media.MediaRouteSelector.Builder

Overview

Builder for media route selectors.

Summary

Constructors
publicBuilder()

Creates an empty media route selector builder.

publicBuilder(MediaRouteSelector selector)

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

Methods
public MediaRouteSelector.BuilderaddControlCategories(java.util.Collection<java.lang.String> categories)

Adds a list of media control categories to the builder.

public MediaRouteSelector.BuilderaddControlCategory(java.lang.String category)

Adds a media control category to the builder.

public MediaRouteSelector.BuilderaddSelector(MediaRouteSelector selector)

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

public MediaRouteSelectorbuild()

Builds the media route selector.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates an empty media route selector builder.

public Builder(MediaRouteSelector selector)

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

Methods

public MediaRouteSelector.Builder addControlCategory(java.lang.String category)

Adds a media control category to the builder.

Parameters:

category: The category to add to the set of desired capabilities, such as MediaControlIntent.CATEGORY_LIVE_AUDIO.

Returns:

The builder instance for chaining.

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

Adds a list of media control categories to the builder.

Parameters:

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

Returns:

The builder instance for chaining.

public MediaRouteSelector.Builder addSelector(MediaRouteSelector selector)

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

Parameters:

selector: The media route selector whose contents are to be added.

Returns:

The builder instance for chaining.

public MediaRouteSelector build()

Builds the media route selector.