Stay organized with collections
Save and categorize content based on your preferences.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# android.media.session\n=====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/session/package-summary \"View this page in Java\")\n\nInterfaces\n----------\n\n|--------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| [OnActiveSessionsChangedListener](/reference/kotlin/android/media/session/MediaSessionManager.OnActiveSessionsChangedListener) | Listens for changes to the list of active sessions. |\n| [OnMediaKeyEventSessionChangedListener](/reference/kotlin/android/media/session/MediaSessionManager.OnMediaKeyEventSessionChangedListener) | Listener to receive changes in the media key event session, which would receive a media key event unless specified. |\n| [OnSession2TokensChangedListener](/reference/kotlin/android/media/session/MediaSessionManager.OnSession2TokensChangedListener) | Listens for changes to the [getSession2Tokens()](/reference/kotlin/android/media/session/MediaSessionManager#getSession2Tokens()). |\n\nClasses\n-------\n\n|------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [MediaController](/reference/kotlin/android/media/session/MediaController) | Allows an app to interact with an ongoing media session. |\n| [MediaSession](/reference/kotlin/android/media/session/MediaSession) | Allows interaction with media controllers, volume keys, media buttons, and transport controls. |\n| [MediaSessionManager](/reference/kotlin/android/media/session/MediaSessionManager) | Provides support for interacting with [media sessions](/reference/kotlin/android/media/session/MediaSession) that applications have published to express their ongoing media playback state. |\n| [PlaybackState](/reference/kotlin/android/media/session/PlaybackState) | Playback state for a [MediaSession](/reference/kotlin/android/media/session/MediaSession). |"]]