MediaRouteProvider.DynamicGroupRouteController

public static abstract class MediaRouteProvider.DynamicGroupRouteController
extends MediaRouteProvider.RouteController

java.lang.Object
   ↳ androidx.mediarouter.media.MediaRouteProvider.RouteController
     ↳ androidx.mediarouter.media.MediaRouteProvider.DynamicGroupRouteController


Provides control over a dynamic group route.

Summary

Nested classes

class MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor

Contains a route, its selection state and its capabilities. 

interface MediaRouteProvider.DynamicGroupRouteController.OnDynamicRoutesChangedListener

Used to notify media router each route's property changes regarding this MediaRouteProvider.DynamicGroupRouteController instance. 

Public constructors

MediaRouteProvider.DynamicGroupRouteController()

Public methods

abstract String getDynamicGroupRouteId()

Gets the ID of the dynamic group route.

String getGroupableSelectionTitle()

Gets the title of the groupable routes section on the UX such as androidx.mediarouter.app.MediaRouteCastDialog, which is proposed by MediaRouteProvider.

String getTransferableSectionTitle()

Gets the title of the transferable routes section on the UX such as androidx.mediarouter.app.MediaRouteCastDialog, which is proposed by MediaRouteProvider.

abstract void onAddMemberRoute(String routeId)

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

abstract void onRemoveMemberRoute(String routeId)

Called when a user removes a route from casting session.

abstract void onUpdateMemberRoutes(List<String> routeIds)

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

abstract void setOnDynamicRoutesChangedListener(Executor executor, MediaRouteProvider.DynamicGroupRouteController.OnDynamicRoutesChangedListener listener)

Called by MediaRouter to set the listener.

Inherited methods

Public constructors

MediaRouteProvider.DynamicGroupRouteController

public MediaRouteProvider.DynamicGroupRouteController ()

Public methods

getDynamicGroupRouteId

public abstract String getDynamicGroupRouteId ()

Gets the ID of the dynamic group route. Note that the route may have not been published yet by the time the MediaRouteProvider.DynamicGroupRouteController is created.

Returns
String

getGroupableSelectionTitle

public String getGroupableSelectionTitle ()

Gets the title of the groupable routes section on the UX such as androidx.mediarouter.app.MediaRouteCastDialog, which is proposed by MediaRouteProvider. e.g. "Add a device."

Returns
String

getTransferableSectionTitle

public String getTransferableSectionTitle ()

Gets the title of the transferable routes section on the UX such as androidx.mediarouter.app.MediaRouteCastDialog, which is proposed by MediaRouteProvider. e.g. "Play on group."

Returns
String

onAddMemberRoute

public abstract void onAddMemberRoute (String routeId)

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

Parameters
routeId String

onRemoveMemberRoute

public abstract void onRemoveMemberRoute (String routeId)

Called when a user removes a route from casting session.

Parameters
routeId String

onUpdateMemberRoutes

public abstract void onUpdateMemberRoutes (List<String> routeIds)

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

Parameters
routeIds List

setOnDynamicRoutesChangedListener

public abstract void setOnDynamicRoutesChangedListener (Executor executor,
                MediaRouteProvider.DynamicGroupRouteController.OnDynamicRoutesChangedListener listener)

Called by MediaRouter to set the listener.

Parameters
executor Executor

listener MediaRouteProvider.DynamicGroupRouteController.OnDynamicRoutesChangedListener