Android.Media.Session Namespace

Provides media sessions, controllers, playback state, and callbacks for media playback control.

Classes

Name Description
MediaController

Allows an app to interact with an ongoing media session.

MediaController.Callback

Callback for receiving updates from the session.

MediaController.PlaybackInfo

Holds information about the current playback and how audio is handled for this session.

MediaController.PlaybackInfo.InterfaceConsts

Provides constants from IParcelable for MediaController.PlaybackInfo.

MediaController.TransportControls

Interface for controlling media playback on a session.

MediaSession

Allows interaction with media controllers, volume keys, media buttons, and transport controls.

MediaSession.Callback

Receives media buttons, transport controls, and commands from controllers and the system.

MediaSession.QueueItem

A single item that is part of the play queue.

MediaSession.QueueItem.InterfaceConsts

Provides constants from IParcelable for MediaSession.QueueItem.

MediaSession.Token

Represents an ongoing session.

MediaSession.Token.InterfaceConsts

Provides constants from IParcelable for MediaSession.Token.

MediaSessionManager

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

MediaSessionManager.ActiveSessionsChangedEventArgs

Provides the controller list for a change to the active media sessions.

MediaSessionManager.MediaKeyEventSessionChangedEventArgs

Provides information about a change to the default media key event session.

MediaSessionManager.RemoteUserInfo

Information of a remote user of MediaSession or MediaBrowserService.

MediaSessionManager.Session2TokensChangedEventArgs

Provides the session token list for a change to the available sessions.

PlaybackState

Playback state for a MediaSession.

PlaybackState.Builder

Builder for PlaybackState objects.

PlaybackState.CustomAction

PlaybackState.CustomAction CustomActions can be used to extend the capabilities of the standard transport controls by exposing app specific actions to MediaController MediaControllers.

PlaybackState.CustomAction.Builder

Builder for CustomAction objects.

PlaybackState.CustomAction.InterfaceConsts

Provides constants from IParcelable for PlaybackState.CustomAction.

PlaybackState.InterfaceConsts

Provides constants from IParcelable for PlaybackState.

Interfaces

Name Description
MediaSessionManager.IOnActiveSessionsChangedListener

Listens for changes to the list of active sessions.

MediaSessionManager.IOnMediaKeyEventSessionChangedListener

Listener to receive changes in the media key event session, which would receive a media key event unless specified.

MediaSessionManager.IOnSession2TokensChangedListener

Listens for changes to the #getSession2Tokens().

Enums

Name Description
MediaPlaybackType

Enumerates values returned by the Local, and Remote members.

MediaSessionFlags

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.Session.MediaSession.SetFlags member.

PlaybackStateCode

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.Session.PlaybackState+Builder.SetState, and F:Android.Media.Session.PlaybackState+Builder.SetState members.