Callback

abstract class Callback : DeathRecipient
kotlin.Any
   ↳ android.support.v4.media.session.MediaControllerCompat.Callback

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

Summary

Public constructors

Public methods

open Unit

open Unit

Override to handle changes to the audio info.

open Unit

Override to handle changes to the captioning enabled status.

open Unit

Override to handle changes to the MediaSessionCompat extras.

open Unit

Override to handle changes to the current metadata.

open Unit

Override to handle changes in playback state.

open Unit

Override to handle changes to items in the queue.

open Unit

Override to handle changes to the queue title.

open Unit
onRepeatModeChanged(repeatMode: Int)

Override to handle changes to the repeat mode.

open Unit

Override to handle the session being destroyed.

open Unit
onSessionEvent(event: String!, extras: Bundle!)

Override to handle custom events sent by the session owner without a specified interface.

open Unit

Override to handle the session being ready.

open Unit
onShuffleModeChanged(shuffleMode: Int)

Override to handle changes to the shuffle mode.

Public constructors

<init>

Callback()

Public methods

binderDied

open fun binderDied(): Unit

onAudioInfoChanged

open fun onAudioInfoChanged(info: MediaControllerCompat.PlaybackInfo!): Unit

Override to handle changes to the audio info.

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

onCaptioningEnabledChanged

open fun onCaptioningEnabledChanged(enabled: Boolean): Unit

Override to handle changes to the captioning enabled status.

Parameters
enabled Boolean: true if captioning is enabled, false otherwise.

onExtrasChanged

open fun onExtrasChanged(extras: Bundle!): Unit

Override to handle changes to the MediaSessionCompat extras.

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

onMetadataChanged

open fun onMetadataChanged(metadata: MediaMetadataCompat!): Unit

Override to handle changes to the current metadata.

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

onPlaybackStateChanged

open fun onPlaybackStateChanged(state: PlaybackStateCompat!): Unit

Override to handle changes in playback state.

Parameters
state PlaybackStateCompat!: The new playback state of the session

onQueueChanged

open fun onQueueChanged(queue: MutableList<MediaSessionCompat.QueueItem!>!): Unit

Override to handle changes to items in the queue.

Parameters
queue MutableList<MediaSessionCompat.QueueItem!>!: 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.

onQueueTitleChanged

open fun onQueueTitleChanged(title: CharSequence!): Unit

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.

onRepeatModeChanged

open fun onRepeatModeChanged(repeatMode: Int): Unit

Override to handle changes to the repeat mode.

Parameters
repeatMode Int: The repeat mode. It should be one of followings: PlaybackStateCompat#REPEAT_MODE_NONE, PlaybackStateCompat#REPEAT_MODE_ONE, PlaybackStateCompat#REPEAT_MODE_ALL, PlaybackStateCompat#REPEAT_MODE_GROUP

onSessionDestroyed

open fun onSessionDestroyed(): Unit

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

onSessionEvent

open fun onSessionEvent(event: String!, extras: Bundle!): Unit

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 String!: Optional parameters for the event.

onSessionReady

open fun onSessionReady(): Unit

Override to handle the session being ready.

onShuffleModeChanged

open fun onShuffleModeChanged(shuffleMode: Int): Unit

Override to handle changes to the shuffle mode.

Parameters
shuffleMode Int: The shuffle mode. Must be one of the followings: PlaybackStateCompat#SHUFFLE_MODE_NONE, PlaybackStateCompat#SHUFFLE_MODE_ALL, PlaybackStateCompat#SHUFFLE_MODE_GROUP