public static class MediaRouter.SimpleCallback extends MediaRouter.Callback
MediaRouter.Callback
.
Each abstract method is defined as a no-op. Override just the ones
you need.Constructor and Description |
---|
SimpleCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onRouteAdded(MediaRouter router,
MediaRouter.RouteInfo info)
Called when a route for the specified type was added.
|
void |
onRouteChanged(MediaRouter router,
MediaRouter.RouteInfo info)
Called when an aspect of the indicated route has changed.
|
void |
onRouteGrouped(MediaRouter router,
MediaRouter.RouteInfo info,
MediaRouter.RouteGroup group,
int index)
Called when a route is added to a group.
|
void |
onRouteRemoved(MediaRouter router,
MediaRouter.RouteInfo info)
Called when a route for the specified type was removed.
|
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.
|
void |
onRouteUngrouped(MediaRouter router,
MediaRouter.RouteInfo info,
MediaRouter.RouteGroup group)
Called when a route is removed from a group.
|
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.
|
void |
onRouteVolumeChanged(MediaRouter router,
MediaRouter.RouteInfo info)
Called when a route's volume changes.
|
onRoutePresentationDisplayChanged
public void onRouteSelected(MediaRouter router, int type, MediaRouter.RouteInfo info)
MediaRouter.Callback
onRouteSelected
in class MediaRouter.Callback
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 void onRouteUnselected(MediaRouter router, int type, MediaRouter.RouteInfo info)
MediaRouter.Callback
onRouteUnselected
in class MediaRouter.Callback
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 void onRouteAdded(MediaRouter router, MediaRouter.RouteInfo info)
MediaRouter.Callback
onRouteAdded
in class MediaRouter.Callback
router
- the MediaRouter reporting the eventinfo
- Route that has become available for usepublic void onRouteRemoved(MediaRouter router, MediaRouter.RouteInfo info)
MediaRouter.Callback
onRouteRemoved
in class MediaRouter.Callback
router
- the MediaRouter reporting the eventinfo
- Route that has been removed from availabilitypublic void onRouteChanged(MediaRouter router, MediaRouter.RouteInfo info)
MediaRouter.Callback
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.
onRouteChanged
in class MediaRouter.Callback
router
- the MediaRouter reporting the eventinfo
- The route that was changedpublic void onRouteGrouped(MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group, int index)
MediaRouter.Callback
onRouteGrouped
in class MediaRouter.Callback
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 void onRouteUngrouped(MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group)
MediaRouter.Callback
onRouteUngrouped
in class MediaRouter.Callback
router
- the MediaRouter reporting the eventinfo
- The route that was removedgroup
- The group the route was removed frompublic void onRouteVolumeChanged(MediaRouter router, MediaRouter.RouteInfo info)
MediaRouter.Callback
onRouteVolumeChanged
in class MediaRouter.Callback
router
- the MediaRouter reporting the eventinfo
- The route with altered volume