Callback
abstract class Callback
kotlin.Any | |
↳ | 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 setCallback
.
Summary
Public constructors |
|
---|---|
<init>() |
Public methods |
|
---|---|
open Unit |
onAddQueueItem(description: MediaDescriptionCompat!) Called when a |
open Unit |
onAddQueueItem(description: MediaDescriptionCompat!, index: Int) Called when a |
open Unit |
onCommand(command: String!, extras: Bundle!, cb: ResultReceiver!) Called when a controller has sent a custom command to this session. |
open Unit |
onCustomAction(action: String!, extras: Bundle!) Called when a |
open Unit |
Override to handle requests to fast forward. |
open Boolean |
onMediaButtonEvent(mediaButtonEvent: Intent!) Override to handle media button events. |
open Unit |
onPause() Override to handle requests to pause playback. |
open Unit |
onPlay() Override to handle requests to begin playback. |
open Unit |
onPlayFromMediaId(mediaId: String!, extras: Bundle!) Override to handle requests to play a specific mediaId that was provided by your app. |
open Unit |
onPlayFromSearch(query: String!, extras: Bundle!) Override to handle requests to begin playback from a search query. |
open Unit |
onPlayFromUri(uri: Uri!, extras: Bundle!) Override to handle requests to play a specific media item represented by a URI. |
open Unit |
Override to handle requests to prepare playback. |
open Unit |
onPrepareFromMediaId(mediaId: String!, extras: Bundle!) Override to handle requests to prepare for playing a specific mediaId that was provided by your app. |
open Unit |
onPrepareFromSearch(query: String!, extras: Bundle!) Override to handle requests to prepare playback from a search query. |
open Unit |
onPrepareFromUri(uri: Uri!, extras: Bundle!) Override to handle requests to prepare a specific media item represented by a URI. |
open Unit |
onRemoveQueueItem(description: MediaDescriptionCompat!) Called when a |
open Unit |
onRemoveQueueItemAt(index: Int) Called when a |
open Unit |
onRewind() Override to handle requests to rewind. |
open Unit |
Override to handle requests to seek to a specific position in ms. |
open Unit |
onSetCaptioningEnabled(enabled: Boolean) Override to handle requests to enable/disable captioning. |
open Unit |
onSetRating(rating: |