MediaRouter2.TransferCallback.OnTransfer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when a media is transferred between two different routing controllers.
[Android.Runtime.Register("onTransfer", "(Landroid/media/MediaRouter2$RoutingController;Landroid/media/MediaRouter2$RoutingController;)V", "GetOnTransfer_Landroid_media_MediaRouter2_RoutingController_Landroid_media_MediaRouter2_RoutingController_Handler", ApiSince=30)]
public virtual void OnTransfer(Android.Media.MediaRouter2.RoutingController oldController, Android.Media.MediaRouter2.RoutingController newController);
[<Android.Runtime.Register("onTransfer", "(Landroid/media/MediaRouter2$RoutingController;Landroid/media/MediaRouter2$RoutingController;)V", "GetOnTransfer_Landroid_media_MediaRouter2_RoutingController_Landroid_media_MediaRouter2_RoutingController_Handler", ApiSince=30)>]
abstract member OnTransfer : Android.Media.MediaRouter2.RoutingController * Android.Media.MediaRouter2.RoutingController -> unit
override this.OnTransfer : Android.Media.MediaRouter2.RoutingController * Android.Media.MediaRouter2.RoutingController -> unit
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.
- Attributes
Remarks
Called when a media is transferred between two different routing controllers. This can happen by calling transferTo(MediaRoute2Info). Override this to start playback with newController. You may want to get the status of the media that is being played with oldController and resume it continuously with newController. After this is called, any callbacks with oldController will not be invoked unless oldController is the system controller. You need to release oldController before playing the media with newController.
Android reference for android.media.MediaRouter2.TransferCallback.onTransfer.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.