java.lang.Object | |
↳ | android.support.v4.media.session.MediaSessionCompat.Callback |
Receives transport controls, media buttons, and commands from controllers
and the system. The callback may be set using setCallback(MediaSessionCompat.Callback)
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when a controller has sent a custom command to this session.
| |||||||||||
Called when a
MediaControllerCompat wants a
PlaybackStateCompat.CustomAction to be performed.
| |||||||||||
Override to handle requests to fast forward.
| |||||||||||
Override to handle media button events.
| |||||||||||
Override to handle requests to pause playback.
| |||||||||||
Override to handle requests to begin playback.
| |||||||||||
Override to handle requests to play a specific mediaId that was
provided by your app.
| |||||||||||
Override to handle requests to begin playback from a search query.
| |||||||||||
Override to handle requests to rewind.
| |||||||||||
Override to handle requests to seek to a specific position in ms.
| |||||||||||
Override to handle the item being rated.
| |||||||||||
Override to handle requests to skip to the next media item.
| |||||||||||
Override to handle requests to skip to the previous media item.
| |||||||||||
Override to handle requests to play an item with a given id from the
play queue.
| |||||||||||
Override to handle requests to stop playback.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Called when a controller has sent a custom command to this session. The owner of the session may handle custom commands but is not required to.
command | The command name. |
---|---|
extras | Optional parameters for the command, may be null. |
cb | A result receiver to which a result may be sent by the command, may be null. |
Called when a MediaControllerCompat
wants a
PlaybackStateCompat.CustomAction
to be performed.
action | The action that was originally sent in the
PlaybackStateCompat.CustomAction . |
---|---|
extras | Optional extras specified by the
MediaControllerCompat .
|
Override to handle requests to fast forward.
Override to handle media button events.
mediaButtonEvent | The media button event intent. |
---|
Override to handle requests to pause playback.
Override to handle requests to begin playback.
Override to handle requests to play a specific mediaId that was provided by your app.
Override to handle requests to begin playback from a search query. An empty query indicates that the app may play any music. The implementation should attempt to make a smart choice about what to play.
Override to handle requests to rewind.
Override to handle requests to seek to a specific position in ms.
pos | New position to move to, in milliseconds. |
---|
Override to handle requests to skip to the next media item.
Override to handle requests to skip to the previous media item.
Override to handle requests to play an item with a given id from the play queue.
Override to handle requests to stop playback.