Callback
abstract class Callback
kotlin.Any | |
↳ | android.media.MediaRouter.Callback |
Interface for receiving events about media routing changes. All methods of this interface will be called from the application's main thread.
A Callback will only receive events relevant to routes that the callback was registered for unless the MediaRouter#CALLBACK_FLAG_UNFILTERED_EVENTS
flag was specified in MediaRouter#addCallback(int, Callback, int)
.
Summary
Public constructors | |
---|---|
Callback() |
Public methods | |
---|---|
abstract Unit |
onRouteAdded(router: MediaRouter!, info: MediaRouter.RouteInfo!) Called when a route for the specified type was added. |
abstract Unit |
onRouteChanged(router: MediaRouter!, info: MediaRouter.RouteInfo!) Called when an aspect of the indicated route has changed. |
abstract Unit |
onRouteGrouped(router: MediaRouter!, info: MediaRouter.RouteInfo!, group: MediaRouter.RouteGroup!, index: Int) Called when a route is added to a group. |
open Unit |
onRoutePresentationDisplayChanged(router: MediaRouter!, info: MediaRouter.RouteInfo!) Called when a route's presentation display changes. |
abstract Unit |
onRouteRemoved(router: MediaRouter!, info: MediaRouter.RouteInfo!) Called when a route for the specified type was removed. |
abstract Unit |
onRouteSelected(router: MediaRouter!, type: Int, info: MediaRouter.RouteInfo!) Called when the supplied route becomes selected as the active route for the given route type. |
abstract Unit |
onRouteUngrouped(router: MediaRouter!, info: MediaRouter.RouteInfo!, group: MediaRouter.RouteGroup!) Called when a route is removed from a group. |
abstract Unit |
onRouteUnselected(router: MediaRouter!, type: Int, info: MediaRouter.RouteInfo!) Called when the supplied route becomes unselected as the active route for the given route type. |
abstract Unit |
onRouteVolumeChanged(router: MediaRouter!, info: MediaRouter.RouteInfo!) Called when a route's volume changes. |
Public constructors
Callback
Callback()
Public methods
onRouteAdded
abstract fun onRouteAdded(
router: MediaRouter!,
info: MediaRouter.RouteInfo!
): Unit
Called when a route for the specified type was added.
Parameters | |
---|---|
router |
MediaRouter!: the MediaRouter reporting the event |
info |
MediaRouter.RouteInfo!: Route that has become available for use |
onRouteChanged
abstract fun onRouteChanged(
router: MediaRouter!,
info: MediaRouter.RouteInfo!
): Unit
Called when an aspect of the indicated route has changed.
This will not indicate that the types supported by this route have changed, only that cosmetic info such as name or status have been updated.
Parameters | |
---|---|
router |
MediaRouter!: the MediaRouter reporting the event |
info |
MediaRouter.RouteInfo!: The route that was changed |
onRouteGrouped
abstract fun onRouteGrouped(
router: MediaRouter!,
info: MediaRouter.RouteInfo!,
group: MediaRouter.RouteGroup!,
index: Int
): Unit
Called when a route is added to a group.
Parameters | |
---|---|
router |
MediaRouter!: the MediaRouter reporting the event |
info |
MediaRouter.RouteInfo!: The route that was added |
group |
MediaRouter.RouteGroup!: The group the route was added to |
index |
Int: The route index within group that info was added at |
onRoutePresentationDisplayChanged
open fun onRoutePresentationDisplayChanged(
router: MediaRouter!,
info: MediaRouter.RouteInfo!
): Unit
Called when a route's presentation display changes.
This method is called whenever the route's presentation display becomes available, is removes or has changes to some of its properties (such as its size).
Parameters | |
---|---|
router |
MediaRouter!: the MediaRouter reporting the event |
info |
MediaRouter.RouteInfo!: The route whose presentation display changed |
onRouteRemoved
abstract fun onRouteRemoved(
router: MediaRouter!,
info: MediaRouter.RouteInfo!
): Unit
Called when a route for the specified type was removed.
Parameters | |
---|---|
router |
MediaRouter!: the MediaRouter reporting the event |
info |
MediaRouter.RouteInfo!: Route that has been removed from availability |
onRouteSelected
abstract fun onRouteSelected(
router: MediaRouter!,
type: Int,
info: MediaRouter.RouteInfo!
): Unit
Called when the supplied route becomes selected as the active route for the given route type.
Parameters | |
---|---|
router |
MediaRouter!: the MediaRouter reporting the event |
type |
Int: Type flag set indicating the routes that have been selected |
info |
MediaRouter.RouteInfo!: Route that has been selected for the given route types |
onRouteUngrouped
abstract fun onRouteUngrouped(
router: MediaRouter!,
info: MediaRouter.RouteInfo!,
group: MediaRouter.RouteGroup!
): Unit
Called when a route is removed from a group.
Parameters | |
---|---|
router |
MediaRouter!: the MediaRouter reporting the event |
info |
MediaRouter.RouteInfo!: The route that was removed |
group |
MediaRouter.RouteGroup!: The group the route was removed from |
onRouteUnselected
abstract fun onRouteUnselected(
router: MediaRouter!,
type: Int,
info: MediaRouter.RouteInfo!
): Unit
Called when the supplied route becomes unselected as the active route for the given route type.
Parameters | |
---|---|
router |
MediaRouter!: the MediaRouter reporting the event |
type |
Int: Type flag set indicating the routes that have been unselected |
info |
MediaRouter.RouteInfo!: Route that has been unselected for the given route types |
onRouteVolumeChanged
abstract fun onRouteVolumeChanged(
router: MediaRouter!,
info: MediaRouter.RouteInfo!
): Unit
Called when a route's volume changes.
Parameters | |
---|---|
router |
MediaRouter!: the MediaRouter reporting the event |
info |
MediaRouter.RouteInfo!: The route with altered volume |