Share via


MediaSessionManager.AddOnActiveSessionsChangedListener Method

Definition

Overloads

AddOnActiveSessionsChangedListener(MediaSessionManager+IOnActiveSessionsChangedListener, ComponentName)

Add a listener to be notified when the list of active sessions changes.

AddOnActiveSessionsChangedListener(MediaSessionManager+IOnActiveSessionsChangedListener, ComponentName, Handler)

Add a listener to be notified when the list of active sessions changes.

AddOnActiveSessionsChangedListener(MediaSessionManager+IOnActiveSessionsChangedListener, ComponentName)

Add a listener to be notified when the list of active sessions changes.

[Android.Runtime.Register("addOnActiveSessionsChangedListener", "(Landroid/media/session/MediaSessionManager$OnActiveSessionsChangedListener;Landroid/content/ComponentName;)V", "")]
public void AddOnActiveSessionsChangedListener (Android.Media.Session.MediaSessionManager.IOnActiveSessionsChangedListener sessionListener, Android.Content.ComponentName? notificationListener);
[<Android.Runtime.Register("addOnActiveSessionsChangedListener", "(Landroid/media/session/MediaSessionManager$OnActiveSessionsChangedListener;Landroid/content/ComponentName;)V", "")>]
member this.AddOnActiveSessionsChangedListener : Android.Media.Session.MediaSessionManager.IOnActiveSessionsChangedListener * Android.Content.ComponentName -> unit

Parameters

sessionListener
MediaSessionManager.IOnActiveSessionsChangedListener

The listener to add.

notificationListener
ComponentName

The enabled notification listener component. May be null.

Attributes

Remarks

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

AddOnActiveSessionsChangedListener(MediaSessionManager+IOnActiveSessionsChangedListener, ComponentName, Handler)

Add a listener to be notified when the list of active sessions changes.

[Android.Runtime.Register("addOnActiveSessionsChangedListener", "(Landroid/media/session/MediaSessionManager$OnActiveSessionsChangedListener;Landroid/content/ComponentName;Landroid/os/Handler;)V", "")]
public void AddOnActiveSessionsChangedListener (Android.Media.Session.MediaSessionManager.IOnActiveSessionsChangedListener sessionListener, Android.Content.ComponentName? notificationListener, Android.OS.Handler? handler);
[<Android.Runtime.Register("addOnActiveSessionsChangedListener", "(Landroid/media/session/MediaSessionManager$OnActiveSessionsChangedListener;Landroid/content/ComponentName;Landroid/os/Handler;)V", "")>]
member this.AddOnActiveSessionsChangedListener : Android.Media.Session.MediaSessionManager.IOnActiveSessionsChangedListener * Android.Content.ComponentName * Android.OS.Handler -> unit

Parameters

sessionListener
MediaSessionManager.IOnActiveSessionsChangedListener

The listener to add.

notificationListener
ComponentName

The enabled notification listener component. May be null.

handler
Handler

The handler to post events to.

Attributes

Remarks

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