belongs to Maven artifact com.android.support:mediarouter-v7:28.0.0-alpha1
MediaRouter.Callback
public
static
abstract
class
MediaRouter.Callback
extends Object
java.lang.Object | |
↳ | android.support.v7.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 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
|
onRouteUnselected(MediaRouter router, MediaRouter.RouteInfo route, int reason)
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. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public constructors
Public methods
onProviderAdded
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
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 |
MediaRouter.ProviderInfo : The provider that was changed.
|
onProviderRemoved
void onProviderRemoved (MediaRouter router, MediaRouter.ProviderInfo provider)
Called when a media route provider has been removed.
Parameters | |
---|---|
router |
MediaRouter : The media router reporting the event. |
provider |
MediaRouter.ProviderInfo : The provider that has been removed from availability.
|
onRouteAdded
void onRouteAdded (MediaRouter router, MediaRouter.RouteInfo route)
Called when a media route has been added.
Parameters | |
---|---|
router |
MediaRouter : The media router reporting the event. |
route |
MediaRouter.RouteInfo : The route that has become available for use.
|
onRouteChanged
void onRouteChanged (MediaRouter router, MediaRouter.RouteInfo route)
Called when a property of the indicated media route has changed.
Parameters | |
---|---|
router |
MediaRouter : The media router reporting the event. |
route |
MediaRouter.RouteInfo : The route that was changed.
|
onRoutePresentationDisplayChanged
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 |
MediaRouter : The media router reporting the event. |
route |
MediaRouter.RouteInfo : The route whose presentation display changed. |
See also:
onRouteRemoved
void onRouteRemoved (MediaRouter router, MediaRouter.RouteInfo route)
Called when a media route has been removed.
Parameters | |
---|---|
router |
MediaRouter : The media router reporting the event. |
route |
MediaRouter.RouteInfo : The route that has been removed from availability.
|
onRouteSelected
void onRouteSelected (MediaRouter router, MediaRouter.RouteInfo route)
Called when the supplied media route becomes selected as the active route.
Parameters | |
---|---|
router |
MediaRouter : The media router reporting the event. |
route |
MediaRouter.RouteInfo : The route that has been selected.
|
onRouteUnselected
void onRouteUnselected (MediaRouter router, MediaRouter.RouteInfo route)
Called when the supplied media route becomes unselected as the active route.
For detailed reason, override onRouteUnselected(MediaRouter, RouteInfo, int)
instead.
Parameters | |
---|---|
router |
MediaRouter : The media router reporting the event. |
route |
MediaRouter.RouteInfo : The route that has been unselected.
|
onRouteUnselected
void onRouteUnselected (MediaRouter router, MediaRouter.RouteInfo route, int reason)
Called when the supplied media route becomes unselected as the active route.
The default implementation calls onRouteUnselected(MediaRouter, MediaRouter.RouteInfo)
.
The reason provided will be one of the following:
UNSELECT_REASON_UNKNOWN
UNSELECT_REASON_DISCONNECTED
UNSELECT_REASON_STOPPED
UNSELECT_REASON_ROUTE_CHANGED
Parameters | |
---|---|
router |
MediaRouter : The media router reporting the event. |
route |
MediaRouter.RouteInfo : The route that has been unselected. |
reason |
int : The reason for unselecting the route.
|
onRouteVolumeChanged
void onRouteVolumeChanged (MediaRouter router, MediaRouter.RouteInfo route)
Called when a media route's volume changes.
Parameters | |
---|---|
router |
MediaRouter : The media router reporting the event. |
route |
MediaRouter.RouteInfo : The route whose volume changed.
|
Interfaces
Classes
- MediaControlIntent
- MediaItemMetadata
- MediaItemStatus
- MediaItemStatus.Builder
- MediaRouteDescriptor
- MediaRouteDescriptor.Builder
- MediaRouteDiscoveryRequest
- MediaRouteProvider
- MediaRouteProvider.Callback
- MediaRouteProvider.ProviderMetadata
- MediaRouteProvider.RouteController
- MediaRouteProviderDescriptor
- MediaRouteProviderDescriptor.Builder
- MediaRouteProviderService
- MediaRouter
- MediaRouter.Callback
- MediaRouter.ControlRequestCallback
- MediaRouter.ProviderInfo
- MediaRouter.RouteInfo
- MediaRouteSelector
- MediaRouteSelector.Builder
- MediaSessionStatus
- MediaSessionStatus.Builder
- RemotePlaybackClient
- RemotePlaybackClient.ActionCallback
- RemotePlaybackClient.ItemActionCallback
- RemotePlaybackClient.SessionActionCallback
- RemotePlaybackClient.StatusCallback