Java android.support.v4.media.session MediaSessionCompat fields, constructors, methods, implement or subclass

Example usage for Java android.support.v4.media.session MediaSessionCompat fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.support.v4.media.session MediaSessionCompat.

The text is from its open source code.

Field

intFLAG_HANDLES_MEDIA_BUTTONS
Sets this flag on the session to indicate that it can handle media button events.
intFLAG_HANDLES_TRANSPORT_CONTROLS
Sets this flag on the session to indicate that it handles transport control commands through its Callback .
intFLAG_HANDLES_QUEUE_COMMANDS
Sets this flag on the session to indicate that it handles queue management commands through its Callback .

Constructor

Method

MediaControllerCompatgetController()
Gets a controller for this session.
ObjectgetRemoteControlClient()
Gets the underlying framework android.media.RemoteControlClient object.
TokengetSessionToken()
Retrieves a token object that can be used by apps to create a MediaControllerCompat for interacting with this session.
voidrelease()
This must be called when an app has finished performing playback.
voidsendSessionEvent(String event, Bundle extras)
Sends a proprietary event to all MediaControllers listening to this Session.
voidsetActive(boolean active)
Sets if this session is currently active and ready to receive commands.
voidsetCallback(Callback callback)
Adds a callback to receive updates on for the MediaSession.
voidsetCaptioningEnabled(boolean enabled)
Enables/disables captioning for this session.
voidsetExtras(Bundle extras)
Sets some extras that can be associated with the MediaSessionCompat .
voidsetFlags(@SessionFlags int flags)
Sets any flags for the session.
voidsetMetadata(MediaMetadataCompat metadata)
Updates the current metadata.
voidsetPlaybackState(PlaybackStateCompat state)
Updates the current playback state.
voidsetPlaybackToLocal(int stream)
Sets the stream this session is playing on.
voidsetPlaybackToRemote(VolumeProviderCompat volumeProvider)
Configures this session to use remote volume handling.
voidsetQueue(List queue)
Updates the list of items in the play queue.
voidsetQueueTitle(CharSequence title)
Sets the title of the play queue.
voidsetRatingType(@RatingCompat.Style int type)
Sets the style of rating used by this session.
voidsetRepeatMode(@PlaybackStateCompat.RepeatMode int repeatMode)
Sets the repeat mode for this session.
voidsetSessionActivity(PendingIntent pi)
Sets an intent for launching UI for this Session.
voidsetShuffleMode(@PlaybackStateCompat.ShuffleMode int shuffleMode)
Sets the shuffle mode for this session.