RouteCallback
abstract class RouteCallback
kotlin.Any | |
↳ | android.media.MediaRouter2.RouteCallback |
Callback for receiving events about media route discovery.
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
open Unit |
onRoutesAdded(routes: MutableList<MediaRoute2Info!>) Called when routes are added. |
open Unit |
onRoutesChanged(routes: MutableList<MediaRoute2Info!>) Called when the properties of one or more existing routes are changed. |
open Unit |
onRoutesRemoved(routes: MutableList<MediaRoute2Info!>) Called when routes are removed. |
open Unit |
onRoutesUpdated(routes: MutableList<MediaRoute2Info!>) Called when the route list is updated, which can happen when routes are added, removed, or modified. |
Public constructors
RouteCallback
RouteCallback()
Public methods
onRoutesAdded
open funonRoutesAdded(routes: MutableList<MediaRoute2Info!>): Unit
Deprecated: Use onRoutesUpdated(java.util.List)
instead.
Called when routes are added. Whenever you register a callback, this will be invoked with known routes.
Parameters | |
---|---|
routes |
MutableList<MediaRoute2Info!>: the list of routes that have been added. It's never empty. This value cannot be null . |
onRoutesChanged
open funonRoutesChanged(routes: MutableList<MediaRoute2Info!>): Unit
Deprecated: Use onRoutesUpdated(java.util.List)
instead.
Called when the properties of one or more existing routes are changed. For example, it is called when a route's name or volume have changed.
Parameters | |
---|---|
routes |
MutableList<MediaRoute2Info!>: the list of routes that have been changed. It's never empty. This value cannot be null . |
onRoutesRemoved
open funonRoutesRemoved(routes: MutableList<MediaRoute2Info!>): Unit
Deprecated: Use onRoutesUpdated(java.util.List)
instead.
Called when routes are removed.
Parameters | |
---|---|
routes |
MutableList<MediaRoute2Info!>: the list of routes that have been removed. It's never empty. This value cannot be null . |
onRoutesUpdated
open fun onRoutesUpdated(routes: MutableList<MediaRoute2Info!>): Unit
Called when the route list is updated, which can happen when routes are added, removed, or modified. It will also be called when a route callback is registered.
Parameters | |
---|---|
routes |
MutableList<MediaRoute2Info!>: the updated list of routes filtered by the callback's individual discovery preferences. This value cannot be null . |