MediaRouter.Callback

public static abstract class MediaRouter.Callback
extends Object

java.lang.Object
   ↳ androidx.mediarouter.media.MediaRouter.Callback


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

Summary

Public constructors

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 selectedRoute, int reason, MediaRouter.RouteInfo requestedRoute)

Called when the supplied media route becomes selected as the active route, which may be different from the route requested by MediaRouter.selectRoute(RouteInfo).

void onRouteSelected(MediaRouter router, MediaRouter.RouteInfo route, int reason)

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

void onRouteSelected(MediaRouter router, MediaRouter.RouteInfo route)

This method is deprecated. Use onRouteSelected(MediaRouter, RouteInfo, int) instead.

void onRouteUnselected(MediaRouter router, MediaRouter.RouteInfo route, int reason)

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

void onRouteUnselected(MediaRouter router, MediaRouter.RouteInfo route)

This method is deprecated. Use onRouteUnselected(MediaRouter, RouteInfo, int) instead.

void onRouteVolumeChanged(MediaRouter router, MediaRouter.RouteInfo route)

Called when a media route's volume changes.

Inherited methods

Public constructors

Callback

public Callback ()

Public methods

onProviderAdded

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

Called when a media route provider has been added.

Parameters
router MediaRouter: The media router reporting the event.

provider MediaRouter.ProviderInfo: The provider that has become available for use.

onProviderChanged

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

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

Parameters
router MediaRouter: The media router reporting the event.

provider