Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public static abstract class

MediaRouter.Callback

extends Object
java.lang.Object
   ↳ android.support.v7.media.MediaRouter.Callback

Class Overview

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 CALLBACK_FLAG_UNFILTERED_EVENTS flag was specified in addCallback(MediaRouteSelector, Callback, int) .

Summary

Public Constructors
MediaRouter.Callback ()
Public Methods
void onProviderAdded ( MediaRouter router, MediaRouter.ProviderInfo provider)
Called when a media route provider has been added.
void onProviderChanged ( MediaRouter router, MediaRouter.ProviderInfo provider)
Called when a property of the indicated media route provider has changed.
void onProviderRemoved ( MediaRouter router, MediaRouter.ProviderInfo provider)
Called when a media route provider has been removed.
void onRouteAdded ( MediaRouter router, MediaRouter.RouteInfo route)
Called when a media route has been added.
void onRouteChanged ( MediaRouter router, MediaRouter.RouteInfo route)
Called when a property of the indicated media route has changed.
void onRoutePresentationDisplayChanged ( MediaRouter router, MediaRouter.RouteInfo route)
Called when a media route's presentation display changes.
void onRouteRemoved ( MediaRouter router, MediaRouter.RouteInfo route)
Called when a media route has been removed.
void onRouteSelected ( MediaRouter router, MediaRouter.RouteInfo route)
Called when the supplied media route becomes selected as the active route.
void onRouteUnselected ( MediaRouter router, MediaRouter.RouteInfo route)
Called when the supplied media route becomes unselected as the active route.
void onRouteVolumeChanged ( MediaRouter router, MediaRouter.RouteInfo route)
Called when a media route's volume changes.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MediaRouter.Callback ()

Public Methods

public void onProviderAdded ( MediaRouter router, MediaRouter.ProviderInfo provider)

Called when a media route provider has been added.

Parameters
router The media router reporting the event.
provider The provider that has become available for use.

public void onProviderChanged ( MediaRouter router, MediaRouter.ProviderInfo provider)

Called when a property of the indicated media route provider has changed.

Parameters
router The media router reporting the event.
provider The provider that was changed.

public void onProviderRemoved ( MediaRouter router, MediaRouter.ProviderInfo provider)

Called when a media route provider has been removed.

Parameters
router The media router reporting the event.
provider The provider that has been removed from availability.

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

Called when a media route has been added.

Parameters
router The media router reporting the event.
route The route that has become available for use.

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

Called when a property of the indicated media route has changed.

Parameters
router The media router reporting the event.
route The route that was changed.

public void onRoutePresentationDisplayChanged ( MediaRouter router, MediaRouter.RouteInfo route)

Called when a media route's presentation display changes.

This method is called whenever the route's presentation display becomes available, is removed or has changes to some of its properties (such as its size).

Parameters
router The media router reporting the event.
route The route whose presentation display changed.

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

Called when a media route has been removed.

Parameters
router The media router reporting the event.
route The route that has been removed from availability.

public void onRouteSelected ( MediaRouter router, MediaRouter.RouteInfo route)

Called when the supplied media route becomes selected as the active route.

Parameters
router The media router reporting the event.
route The route that has been selected.

public void onRouteUnselected ( MediaRouter router, MediaRouter.RouteInfo route)

Called when the supplied media route becomes unselected as the active route.

Parameters
router The media router reporting the event.
route The route that has been unselected.

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

Called when a media route's volume changes.

Parameters
router The media router reporting the event.
route The route whose volume changed.