MediaSessionManager

public final class MediaSessionManager
extends Object

java.lang.Object
   ↳ androidx.media2.session.MediaSessionManager


Provides support for interacting with media sessions that applications have published in order to express their ongoing media playback state.

Summary

Public methods

static MediaSessionManager getInstance(Context context)

Gets an instance of MediaSessionManager associated with the context.

Set<SessionToken> getSessionServiceTokens()

Gets Set of SessionToken for MediaSessionService regardless of their activeness.

Inherited methods

Public methods

getInstance

public static MediaSessionManager getInstance (Context context)

Gets an instance of MediaSessionManager associated with the context.

Parameters
context Context

Returns
MediaSessionManager the MediaSessionManager instance for this context.

getSessionServiceTokens

public Set<SessionToken> getSessionServiceTokens ()

Gets Set of SessionToken for MediaSessionService regardless of their activeness. This list represents media apps that support background playback.

Returns
Set<SessionToken> set of tokens