Share via


MediaPlayer.AddOnRoutingChangedListener Method

Definition

Adds an AudioRouting.OnRoutingChangedListener to receive notifications of routing changes on this MediaPlayer.

[Android.Runtime.Register("addOnRoutingChangedListener", "(Landroid/media/AudioRouting$OnRoutingChangedListener;Landroid/os/Handler;)V", "GetAddOnRoutingChangedListener_Landroid_media_AudioRouting_OnRoutingChangedListener_Landroid_os_Handler_Handler", ApiSince=28)]
public virtual void AddOnRoutingChangedListener (Android.Media.IAudioRoutingOnRoutingChangedListener? listener, Android.OS.Handler? handler);
[<Android.Runtime.Register("addOnRoutingChangedListener", "(Landroid/media/AudioRouting$OnRoutingChangedListener;Landroid/os/Handler;)V", "GetAddOnRoutingChangedListener_Landroid_media_AudioRouting_OnRoutingChangedListener_Landroid_os_Handler_Handler", ApiSince=28)>]
abstract member AddOnRoutingChangedListener : Android.Media.IAudioRoutingOnRoutingChangedListener * Android.OS.Handler -> unit
override this.AddOnRoutingChangedListener : Android.Media.IAudioRoutingOnRoutingChangedListener * Android.OS.Handler -> unit

Parameters

listener
IAudioRoutingOnRoutingChangedListener

The AudioRouting.OnRoutingChangedListener interface to receive notifications of rerouting events.

handler
Handler

Specifies the Handler object for the thread on which to execute the callback. If <code>null</code>, the handler on the main looper will be used.

Implements

Attributes

Remarks

Java documentation for android.media.MediaPlayer.addOnRoutingChangedListener(android.media.OnRoutingChangedListener, android.os.Handler).

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.

Applies to