Most visited

Recently visited

MediaControllerCompat.Callback

public static abstract class MediaControllerCompat.Callback
extends Object implements IBinder.DeathRecipient

java.lang.Object
   ↳ android.support.v4.media.session.MediaControllerCompat.Callback


Callback for receiving updates on from the session. A Callback can be registered using registerCallback(MediaControllerCompat.Callback)

Summary

Public constructors

MediaControllerCompat.Callback()

Public methods

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.

Inherited methods

From class java.lang.Object
From interface android.os.IBinder.DeathRecipient

Public constructors

MediaControllerCompat.Callback

MediaControllerCompat.Callback ()

Public methods

binderDied

void binderDied ()

onAudioInfoChanged

void onAudioInfoChanged (MediaControllerCompat.PlaybackInfo info)

Override to handle changes to the audio info.

Parameters
info MediaControllerCompat.PlaybackInfo: The current audio info for this session.

onExtrasChanged

void onExtrasChanged (Bundle extras)

Override to handle chagnes to the MediaSessionCompat extras.

Parameters
extras Bundle: The extras that can include other information associated with the MediaSessionCompat.

onMetadataChanged

void onMetadataChanged (MediaMetadataCompat metadata)

Override to handle changes to the current metadata.

Parameters
metadata MediaMetadataCompat: The current metadata for the session or null if none.

See also:

onPlaybackStateChanged

void onPlaybackStateChanged (PlaybackStateCompat state)

Override to handle changes in playback state.

Parameters
state PlaybackStateCompat: The new playback state of the session

onQueueChanged

void onQueueChanged (List<MediaSessionCompat.QueueItem> queue)

Override to handle changes to items in the queue.

Parameters
queue List: 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.

See also:

onQueueTitleChanged

void onQueueTitleChanged (CharSequence title)

Override to handle changes to the queue title.

Parameters
title CharSequence: The title that should be displayed along with the play queue such as "Now Playing". May be null if there is no such title.

onSessionDestroyed

void onSessionDestroyed ()

Override to handle the session being destroyed. The session is no longer valid after this call and calls to it will be ignored.

onSessionEvent

void onSessionEvent (String event, 
                Bundle extras)

Override to handle custom events sent by the session owner without a specified interface. Controllers should only handle these for sessions they own.

Parameters
event String: The event from the session.
extras Bundle: Optional parameters for the event.

Hooray!