The Android Developer Challenge is back! Submit your idea before December 2.

DynamicGroupRouteController

abstract class DynamicGroupRouteController : MediaRouteProvider.RouteController
kotlin.Any
   ↳ androidx.mediarouter.media.MediaRouteProvider.RouteController
   ↳ androidx.mediarouter.media.MediaRouteProvider.DynamicGroupRouteController

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

Nested classes

Contains a route, its selection state and its capabilities.

Public constructors

Provides control over a dynamic group route.

Public methods

open String?

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

open String?

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

Unit

Sets the dynamic route descriptors for routes.

abstract Unit
onAddMemberRoute(@NonNull routeId: String)

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

abstract Unit

Called when a user removes a route from casting session.

abstract Unit
onUpdateMemberRoutes(@Nullable routeIds: MutableList<String!>?)

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

Inherited functions

Public constructors

<init>

DynamicGroupRouteController()

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.

Public methods

getGroupableSelectionTitle

@Nullable open fun getGroupableSelectionTitle(): String?

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."

getTransferableSectionTitle

@Nullable open fun getTransferableSectionTitle(): String?

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."

notifyDynamicRoutesChanged

fun notifyDynamicRoutesChanged(routes: MutableCollection<MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor!>!): Unit

Sets the dynamic route descriptors for routes.

The dynamic group controller must call this method to notify the current dynamic group state of routes.

Parameters
routes MutableCollection<MediaRouteProvider.DynamicGroupRouteController.DynamicRouteDescriptor!>!: The dynamic route descriptors for published routes.

onAddMemberRoute

abstract fun onAddMemberRoute(@NonNull routeId: String): Unit

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

onRemoveMemberRoute

abstract fun onRemoveMemberRoute(routeId: String!): Unit

Called when a user removes a route from casting session.

onUpdateMemberRoutes

abstract fun onUpdateMemberRoutes(@Nullable routeIds: MutableList<String!>?): Unit

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