added in version 25.1.0
belongs to Maven artifact
Deprecated since version 27.1.0


public abstract class MediaControllerGlue
extends PlaybackControlGlue


This class was deprecated in API level 27.1.0.
Use MediaControllerAdapter with PlaybackTransportControlGlue or PlaybackBannerControlGlue.

A helper class for implementing a glue layer for MediaControllerCompat.


Inherited constants

From class

Public constructors

MediaControllerGlue(Context context, int[] fastForwardSpeeds, int[] rewindSpeeds)

Constructor for the glue.

Public methods

void attachToMediaController(MediaControllerCompat mediaController)

Attaches to the given media controller.

void detach()

Detaches from the media controller.

int getCurrentPosition()

Returns the current position of the media item in milliseconds.

int getCurrentSpeedId()

Returns the current playback speed.

Drawable getMediaArt()

Returns a bitmap of the art for the media item.