SessionToken

public final class SessionToken
extends Object implements VersionedParcelable

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


Represents an ongoing MediaSession or a MediaSessionService. If it's representing a session service, it may not be ongoing.

This may be passed to apps by the session owner to allow them to create a MediaController to communicate with the session.

It can be also obtained by MediaSessionManager.

Summary

Constants

int TYPE_LIBRARY_SERVICE

Type for MediaLibraryService.

int TYPE_SESSION

Type for MediaSession.

int TYPE_SESSION_SERVICE

Type for MediaSessionService.

Public constructors

SessionToken(Context context, ComponentName serviceComponent)

Constructor for the token.

Public methods

boolean equals(Object obj)
Bundle getExtras()
String getPackageName()
String getServiceName()
int getType()
int getUid()
int hashCode()
String toString()

Inherited methods