MediaSessionCompat.Callback

public static abstract class MediaSessionCompat.Callback
extends Object

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 MediaSessionCompat.setCallback(MediaSessionCompat.Callback).

Don't reuse the callback among the sessions. Callbacks keep internal reference to the session when it's set, so it may misbehave.

Summary

Public constructors

Callback()

Public methods

void onAddQueueItem(MediaDescriptionCompat description, int index)

Called when a MediaControllerCompat wants to add a MediaSessionCompat.QueueItem with the given description at the specified position in the play queue.

void onAddQueueItem(MediaDescriptionCompat description)

Called when a MediaControllerCompat wants to add a MediaSessionCompat.QueueItem with the given description at the end of the play queue.

void onCommand(String command, Bundle extras, ResultReceiver cb)

Called when a controller has sent a custom command to this session.

void onCustomAction(String action, Bundle extras)

Called when a MediaControllerCompat wants a PlaybackStateCompat.CustomAction to be performed.

void onFastForward()

Override to handle requests to fast forward.

boolean onMediaButtonEvent(Intent mediaButtonEvent)

Override to handle media button events.

void onPause()

Override to handle requests to pause playback.

void onPlay()

Override to handle requests to begin playback.

void onPlayFromMediaId(String mediaId, Bundle extras)

Override to handle requests to play a specific mediaId that was provided by your app.

void</