public abstract class

MediaRouteProvider.DynamicGroupRouteController

extends MediaRouteProvider.RouteController

 java.lang.Object

androidx.mediarouter.media.MediaRouteProvider.RouteController

↳androidx.mediarouter.media.MediaRouteProvider.DynamicGroupRouteController

Overview

Provides control over a dynamic group route. A dynamic group route is a group of routes such that a route can be added or removed from the group by the user dynamically.

Summary

Constructors
publicDynamicGroupRouteController()

Methods
public java.lang.StringgetGroupableSelectionTitle()

Gets the title of the groupable routes section which will be shown to the user.

public java.lang.StringgetTransferableSectionTitle()

Gets the title of the transferable routes section which will be shown to the user.

public final voidnotifyDynamicRoutesChanged(java.util.Collection<MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor> routes)

Sets the dynamic route descriptors for the dynamic group.

public final voidnotifyDynamicRoutesChanged(MediaRouteDescriptor groupRoute, java.util.Collection<MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor> dynamicRoutes)

Sets the group route descriptor and the dynamic route descriptors for the dynamic group.

public abstract voidonAddMemberRoute(java.lang.String routeId)

Called when a user adds a route into the casting session.

public abstract voidonRemoveMemberRoute(java.lang.String routeId)

Called when a user removes a route from casting session.

public abstract voidonUpdateMemberRoutes(java.util.List<java.lang.String> routeIds)

Called when a user selects a new set of routes s/he wants the session to be played.

from MediaRouteProvider.RouteControlleronControlRequest, onRelease, onSelect, onSetVolume, onUnselect, onUnselect, onUpdateVolume
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public DynamicGroupRouteController()

Methods

public java.lang.String getGroupableSelectionTitle()

Gets the title of the groupable routes section which will be shown to the user. It is provided by MediaRouteProvider. e.g. "Add a device."

public java.lang.String getTransferableSectionTitle()

Gets the title of the transferable routes section which will be shown to the user. It is provided by MediaRouteProvider. MediaRouteProvider. e.g. "Play on group."

public abstract void onUpdateMemberRoutes(java.util.List<java.lang.String> routeIds)

Called when a user selects a new set of routes s/he wants the session to be played.

public abstract void onAddMemberRoute(java.lang.String routeId)

Called when a user adds a route into the casting session.

public abstract void onRemoveMemberRoute(java.lang.String routeId)

Called when a user removes a route from casting session.

public final void notifyDynamicRoutesChanged(java.util.Collection<MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor> routes)

Deprecated: Use MediaRouteProvider.DynamicGroupRouteController.notifyDynamicRoutesChanged(MediaRouteDescriptor, Collection) instead to notify information of the group.

Sets the dynamic route descriptors for the dynamic group.

The dynamic group controller should call this method to notify the current dynamic group state.

Parameters:

routes: The dynamic route descriptors for published routes. At least a selected or selecting route must be included.

public final void notifyDynamicRoutesChanged(MediaRouteDescriptor groupRoute, java.util.Collection<MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor> dynamicRoutes)

Sets the group route descriptor and the dynamic route descriptors for the dynamic group.

The dynamic group controller should call this method to notify the current dynamic group state.

Parameters:

groupRoute: The media route descriptor describing the dynamic group. The selected route of the media router will contain this information. If it is disabled, the media router will unselect the dynamic group and release the route controller.
dynamicRoutes: The dynamic route descriptors for published routes. At least a selected or selecting route should be included.