public static final class MediaRouteDescriptor.Builder
extends Object


Builder for media route descriptors.


Public constructors

Builder(String id, String name)

Creates a media route descriptor builder.

Builder(MediaRouteDescriptor descriptor)

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

Public methods

MediaRouteDescriptor.Builder addControlFilter(IntentFilter filter)

Adds a media control intent filter for the route.

MediaRouteDescriptor.Builder addControlFilters(Collection<IntentFilter> filters)

Adds a list of media control intent filters for the route.

MediaRouteDescriptor build()

Builds the media route descriptor.

MediaRouteDescriptor.Builder setCanDisconnect(boolean canDisconnect)

Sets whether the route can be disconnected without stopping playback.

MediaRouteDescriptor.Builder setConnecting(boolean connecting)

This method is deprecated. Use setConnectionState(int) instead.

MediaRouteDescriptor.Builder setConnectionState(int connectionState)

Sets the route's connection state.

MediaRouteDescriptor.Builder setDescription(String description)

Sets the user-visible description of the route.

MediaRouteDescriptor.Builder setDeviceType(int deviceType)

Sets the route's receiver device type.

MediaRouteDescriptor.Builder setEnabled(boolean enabled)

Sets whether the route is enabled.

MediaRouteDescriptor.Builder setExtras(Bundle extras)

Sets a bundle of extras for this route descriptor.

MediaRouteDescriptor.Builder setIconUri(Uri iconUri)

Sets the URI of the icon representing this route.

MediaRouteDescriptor.Builder setId(String id)

Sets the unique id of the route.

MediaRouteDescriptor.Builder setIsDynamicGroupRoute(boolean isDynamicGroupRoute)

Sets whether the route is a dynamic group route.

MediaRouteDescriptor.Builder setName(String name)

Sets the user-visible name of the route.

MediaRouteDescriptor.Builder setPlaybackStream(int playbackStream)

Sets the route's playback stream.

MediaRouteDescriptor.Builder setPlaybackType(int playbackType)

Sets the route's playback type.

MediaRouteDescriptor.Builder setPresentationDisplayId(int presentationDisplayId)

Sets the route's presentation display id, or -1 if none.

MediaRouteDescriptor.Builder setSettingsActivity(IntentSender is)

Sets an intent sender for launching the settings activity for this route.

MediaRouteDescriptor.Builder setVolume(int volume)

Sets the route's current volume, or 0 if unknown.

MediaRouteDescriptor.Builder setVolumeHandling(int volumeHandling)

Sets the route's volume handling.

MediaRouteDescriptor.Builder setVolumeMax(int volumeMax)

Sets the route's maximum volume, or 0 if unknown.

Inherited methods

Public constructors


public Builder (String id,