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
Object clone()
Creates and returns a copy of this Object.
boolean equals(Object o)
Compares this instance with the specified object and indicates if they are equal.
void finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
final Class<?> getClass()
Returns the unique instance of Class that represents this object's class.
int hashCode()
Returns an integer hash code for this object.
final void notify()
Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.
final void notifyAll()
Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.
String toString()
Returns a string containing a concise, human-readable description of this object.
final void wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
final void wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.
final void wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

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.