MediaRouter2.TransferCallback
public
static
abstract
class
MediaRouter2.TransferCallback
extends Object
| java.lang.Object | |
| ↳ | android.media.MediaRouter2.TransferCallback |
Callback for receiving events on media transfer.
Summary
Public constructors | |
|---|---|
TransferCallback()
|
|
Public methods | |
|---|---|
void
|
onStop(MediaRouter2.RoutingController controller)
Called when a media routing stops. |
void
|
onTransfer(MediaRouter2.RoutingController oldController, MediaRouter2.RoutingController newController)
Called when a media is transferred between two different routing controllers. |
void
|
onTransferFailure(MediaRoute2Info requestedRoute)
Called when |
Inherited methods | |
|---|---|
Public constructors
TransferCallback
public TransferCallback ()
Public methods
onStop
public void onStop (MediaRouter2.RoutingController controller)
Called when a media routing stops. It can be stopped by a user or a provider.
App should not continue playing media locally when this method is called.
The oldController is released before this method is called, except for the
system controller.
| Parameters | |
|---|---|
controller |
MediaRouter2.RoutingController: the controller that controlled the stopped media routing.
This value cannot be null. |
onTransfer
public void onTransfer (MediaRouter2.RoutingController oldController, MediaRouter2.RoutingController newController)
Called when a media is transferred between two different routing controllers.
This can happen by calling MediaRouter2.transferTo(android.media.MediaRoute2Info).
The oldController is released before this method is called, except for the
system controller.
| Parameters | |
|---|---|
oldController |
MediaRouter2.RoutingController: the previous controller that controlled routing
This value cannot be null. |
newController |
MediaRouter2.RoutingController: the new controller to control routing
This value cannot be null. |
See also:
onTransferFailure
public void onTransferFailure (MediaRoute2Info requestedRoute)
Called when MediaRouter2.transferTo(android.media.MediaRoute2Info) failed.
| Parameters | |
|---|---|
requestedRoute |
MediaRoute2Info: the route info which was used for the transfer
This value cannot be null. |