Android APIs
public static abstract class

MediaSession.TransportControlsCallback

extends Object
java.lang.Object
   ↳ android.media.session.MediaSession.TransportControlsCallback

Class Overview

Receives transport control commands. Callbacks may be registered using addTransportControlsCallback(MediaSession.TransportControlsCallback).

Summary

Public Constructors
MediaSession.TransportControlsCallback()
Public Methods
void onFastForward()
Override to handle requests to fast forward.
void onPause()
Override to handle requests to pause playback.
void onPlay()
Override to handle requests to begin playback.
void onRewind()
Override to handle requests to rewind.
void onSeekTo(long pos)
Override to handle requests to seek to a specific position in ms.
void onSetRating(Rating rating)
Override to handle the item being rated.
void onSkipToNext()
Override to handle requests to skip to the next media item.
void onSkipToPrevious()
Override to handle requests to skip to the previous media item.
void onStop()
Override to handle requests to stop playback.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MediaSession.TransportControlsCallback ()

Public Methods

public void onFastForward ()

Override to handle requests to fast forward.

public void onPause ()

Override to handle requests to pause playback.

public void onPlay ()

Override to handle requests to begin playback.

public void onRewind ()

Override to handle requests to rewind.

public void onSeekTo (long pos)

Override to handle requests to seek to a specific position in ms.

Parameters
pos New position to move to, in milliseconds.

public void onSetRating (Rating rating)

Override to handle the item being rated.

public void onSkipToNext ()

Override to handle requests to skip to the next media item.

public void onSkipToPrevious ()

Override to handle requests to skip to the previous media item.

public void onStop ()

Override to handle requests to stop playback.