Android APIs
public static abstract class

MediaControllerCompat.Callback

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

Class Overview

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 onMetadataChanged(MediaMetadataCompat metadata)
Override to handle changes to the current metadata.
void onPlaybackStateChanged(PlaybackStateCompat state)
Override to handle changes in playback state.
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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MediaControllerCompat.Callback ()

Public Methods

public void onMetadataChanged (MediaMetadataCompat metadata)

Override to handle changes to the current metadata.

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

public void onPlaybackStateChanged (PlaybackStateCompat state)

Override to handle changes in playback state.

Parameters
state The new playback state of the session

public 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.

public 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 The event from the session.
extras Optional parameters for the event.