to top
Android APIs
public static class

MediaRouter.SimpleCallback

extends MediaRouter.Callback
java.lang.Object
   ↳ android.media.MediaRouter.Callback
     ↳ android.media.MediaRouter.SimpleCallback

Class Overview

Stub implementation of MediaRouter.Callback. Each abstract method is defined as a no-op. Override just the ones you need.

Summary

Public Constructors
MediaRouter.SimpleCallback()
Public Methods
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.
[Expand]
Inherited Methods
From class android.media.MediaRouter.Callback
From class java.lang.Object

Public Constructors

public MediaRouter.SimpleCallback ()

Since: API Level 16

Public Methods

public void onRouteAdded (MediaRouter router, MediaRouter.RouteInfo info)

Since: API Level 16

Called when a route for the specified type was added.

Parameters
router the MediaRouter reporting the event
info Route that has become available for use

public void onRouteChanged (MediaRouter router, MediaRouter.RouteInfo info)

Since: API Level 16

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 the MediaRouter reporting the event
info The route that was changed

public void onRouteGrouped (MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group, int index)

Since: API Level 16

Called when a route is added to a group.

Parameters
router the MediaRouter reporting the event
info The route that was added
group The group the route was added to
index The route index within group that info was added at

public void onRouteRemoved (MediaRouter router, MediaRouter.RouteInfo info)

Since: API Level 16

Called when a route for the specified type was removed.

Parameters
router the MediaRouter reporting the event
info Route that has been removed from availability

public void onRouteSelected (MediaRouter router, int type, MediaRouter.RouteInfo info)

Since: API Level 16

Called when the supplied route becomes selected as the active route for the given route type.

Parameters
router the MediaRouter reporting the event
type Type flag set indicating the routes that have been selected
info Route that has been selected for the given route types

public void onRouteUngrouped (MediaRouter router, MediaRouter.RouteInfo info, MediaRouter.RouteGroup group)

Since: API Level 16

Called when a route is removed from a group.

Parameters
router the MediaRouter reporting the event
info The route that was removed
group The group the route was removed from

public void onRouteUnselected (MediaRouter router, int type, MediaRouter.RouteInfo info)

Since: API Level 16

Called when the supplied route becomes unselected as the active route for the given route type.

Parameters
router the MediaRouter reporting the event
type Type flag set indicating the routes that have been unselected
info Route that has been unselected for the given route types

public void onRouteVolumeChanged (MediaRouter router, MediaRouter.RouteInfo info)

Since: API Level 16

Called when a route's volume changes.

Parameters
router the MediaRouter reporting the event
info The route with altered volume