Added in API level 29

MediaSessionManager.OnSession2TokensChangedListener


public static interface MediaSessionManager.OnSession2TokensChangedListener

android.media.session.MediaSessionManager.OnSession2TokensChangedListener


This API is not generally intended for third party application developers. Use the AndroidX Media2 session Library for consistent behavior across all devices.

Listens for changes to the MediaSessionManager.getSession2Tokens(). This can be added using MediaSessionManager.addOnSession2TokensChangedListener(android.media.session.MediaSessionManager.OnSession2TokensChangedListener, android.os.Handler).

Summary

Public methods

abstract void onSession2TokensChanged(List<Session2Token> tokens)

Called when the MediaSessionManager.getSession2Tokens() is changed.

Public methods

onSession2TokensChanged

Added in API level 29
public abstract void onSession2TokensChanged (List<Session2Token> tokens)

Called when the MediaSessionManager.getSession2Tokens() is changed.

Parameters
tokens List: list of Session2Token This value cannot be null.