public abstract static class MediaRouter.Callback extends Object
A Callback will only receive events relevant to routes that the callback was registered for.
Constructor and Description |
---|
MediaRouter.Callback() |
Modifier and Type | Method and Description |
---|---|
abstract void |
onRouteAdded(MediaRouter router,
MediaRouter.RouteInfo info)
Called when a route for the specified type was added.
|
abstract void |
onRouteChanged(MediaRouter router,
MediaRouter.RouteInfo info)
Called when an aspect of the indicated route has changed.
|
abstract void |
onRouteGrouped(MediaRouter router,
MediaRouter.RouteInfo info,
MediaRouter.RouteGroup group,
int index)
Called when a route is added to a group.
|
void |
onRoutePresentationDisplayChanged(MediaRouter router,
MediaRouter.RouteInfo info)
Called when a route's presentation display changes.
|
abstract void |
onRouteRemoved(MediaRouter router,
MediaRouter.RouteInfo info)
Called when a route for the specified type was removed.
|
abstract void |
onRouteSelected(MediaRouter router,
int type,
MediaRouter.RouteInfo info)
Called when the supplied route becomes selected as the active route
for the given route type.
|
abstract void |
onRouteUngrouped(MediaRouter router,
MediaRouter.RouteInfo info,
MediaRouter.RouteGroup group)
Called when a route is removed from a group.
|
abstract void |
onRouteUnselected(MediaRouter router,
int type,
MediaRouter.RouteInfo info)
Called when the supplied route becomes unselected as the active route
for the given route type.
|
abstract void |
onRouteVolumeChanged(MediaRouter router,
MediaRouter.RouteInfo info)
Called when a route's volume changes.
|
public abstract void onRouteSelected(MediaRouter router, int type, MediaRouter.RouteInfo info)
router
- the MediaRouter reporting the eventtype
- Type flag set indicating the routes that have been selectedinfo
- Route that has been selected for the given route typespublic abstract void onRouteUnselected(MediaRouter router, int type, MediaRouter.RouteInfo info)
router
- the MediaRouter reporting the eventtype
- Type flag set indicating the routes that have been unselectedinfo
- Route that has been unselected for the given route typespublic abstract void onRouteAdded(MediaRouter router, MediaRouter.RouteInfo info)
router
- the MediaRouter reporting the eventinfo
- Route that has become available for usepublic abstract void onRouteRemoved(MediaRouter router, MediaRouter.RouteInfo info)
router
- the MediaRouter reporting the eventinfo
- Route that has been removed from availabilitypublic abstract void onRouteChanged(MediaRouter router, MediaRouter.RouteInfo info)
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.
router
- the MediaRouter reporting the eventinfo
- The route that was changedpublic abstract void onRouteGrouped(MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group, int index)
router
- the MediaRouter reporting the eventinfo
- The route that was addedgroup
- The group the route was added toindex
- The route index within group that info was added atpublic abstract void onRouteUngrouped(MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group)
router
- the MediaRouter reporting the eventinfo
- The route that was removedgroup
- The group the route was removed frompublic abstract void onRouteVolumeChanged(MediaRouter router, MediaRouter.RouteInfo info)
router
- the MediaRouter reporting the eventinfo
- The route with altered volumepublic void onRoutePresentationDisplayChanged(MediaRouter router, MediaRouter.RouteInfo info)
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).
router
- the MediaRouter reporting the eventinfo
- The route whose presentation display changedMediaRouter.RouteInfo.getPresentationDisplay()