public abstract static class MediaControllerCompat.Callback extends Object implements IBinder.DeathRecipient
MediaControllerCompat.registerCallback(android.support.v4.media.session.MediaControllerCompat.Callback)
Constructor and Description |
---|
Callback() |
Modifier and Type | Method and Description |
---|---|
void |
binderDied() |
void |
onAudioInfoChanged(MediaControllerCompat.PlaybackInfo info)
Override to handle changes to the audio info.
|
void |
onExtrasChanged(Bundle extras)
Override to handle chagnes to the
MediaSessionCompat extras. |
void |
onMetadataChanged(MediaMetadataCompat metadata)
Override to handle changes to the current metadata.
|
void |
onPlaybackStateChanged(PlaybackStateCompat state)
Override to handle changes in playback state.
|
void |
onQueueChanged(List<MediaSessionCompat.QueueItem> queue)
Override to handle changes to items in the queue.
|
void |
onQueueTitleChanged(CharSequence title)
Override to handle changes to the queue title.
|
void |
onSessionDestroyed()
Override to handle the session being destroyed.
|
void |
onSessionEvent(String event,
Bundle extras)
Override to handle custom events sent by the session owner without a
specified interface.
|
public void onSessionDestroyed()
public void onSessionEvent(String event, Bundle extras)
event
- The event from the session.extras
- Optional parameters for the event.public void onPlaybackStateChanged(PlaybackStateCompat state)
state
- The new playback state of the sessionpublic void onMetadataChanged(MediaMetadataCompat metadata)
metadata
- The current metadata for the session or null if none.MediaMetadataCompat
public void onQueueChanged(List<MediaSessionCompat.QueueItem> queue)
queue
- A list of items in the current play queue. It should
include the currently playing item as well as previous and
upcoming items if applicable.MediaSessionCompat.QueueItem
public void onQueueTitleChanged(CharSequence title)
title
- The title that should be displayed along with the play
queue such as "Now Playing". May be null if there is no
such title.public void onExtrasChanged(Bundle extras)
MediaSessionCompat
extras.extras
- The extras that can include other information
associated with the MediaSessionCompat
.public void onAudioInfoChanged(MediaControllerCompat.PlaybackInfo info)
info
- The current audio info for this session.public void binderDied()
binderDied
in interface IBinder.DeathRecipient