Media

Share media contents and controls with other apps. Superseded by media2.
Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
June 24, 2020 1.1.0 - - 1.2.0-alpha04

Declaring dependencies

To add a dependency on Media, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
    implementation "androidx.media:media:1.1.0"
}

For more information about dependencies, see Add build dependencies.

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.2.0

Version 1.2.0-alpha04

June 24, 2020

androidx.media:media:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits.

New Features

  • Provided a way to support volume control for mediarouter library

API Changes

  • Added AudioManagerCompat#getStreamMaxVolume
  • Added AudioManagerCompat#getStreamMinVolume

Bug Fixes

  • Fixed an interoperability issue between media and media2 on SDK < 21

Version 1.2.0-alpha03

June 10, 2020

androidx.media:media:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits.

API Changes

  • MediaConstants.SESSION_EXTRAS_KEY_AUTHTOKEN has been removed

Bug Fixes

  • Fixed an issue with equals() of RemoteUserInfo

Version 1.2.0-alpha02

April 15, 2020

androidx.media:media:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.

Bug Fixes

  • Prevent modifications of VersionedParcelable classes

Version 1.2.0-alpha01

October 23, 2019

androidx.media:media:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.

API changes

  • Added the following methods:
    • MediaSessionCompat.Callback.onSetPlaybackSpeed()
    • MediaControllerCompat.setPlaybackSpeed()
    • MediaControllerCompat.getSessionInfo()

Bug fixes

  • Implemented prevention against a BadParcelableException when passing a Bundle object via an IPC call
  • The constructor of MediaControllerCompat no longer throws a RemoteException
  • Implemented prevention against the calling of callback methods after MediaSessionCompat.release()

Version 1.1.0

Version 1.1.0

September 5, 2019

androidx.media:media:1.1.0 is released. The commits included in this version can be found here.

Import changes since 1.0.0

  • Introduced AudioAttributesCompat

Version 1.1.0-rc01

June 13, 2019

androidx.media:media:1.1.0-rc01 is released with no changes from 1.1.0-beta02. The commits included in this version can be found here.

Version 1.1.0-beta02

June 5, 2019

androidx.media:media:1.1.0-beta02 is released. The commits included in this version can be found here.

Bug fixes

  • The restriction scope of hidden methods that are used by media2-session has been relaxed to LIBRARY_GROUP_PREFIX.

Version 1.1.0-beta01

May 7, 2019

androidx.media:media:1.1.0-beta01 is released. The commits included in this version can be found here.

New features

  • Changed IllegalPointerException to NullPointerException for the null arguments which marked as @NonNull.

Version 1.1.0-alpha04

April 3, 2019

androidx.media:media:1.1.0-alpha04 is released. The commits included in this version can be found here.

Bug fixes

  • Tweak on a version-compat-test constant (aosp/933656)

Version 1.1.0-alpha03

March 21st, 2019

androidx.media:media:1.1.0-alpha03 is released. The full list of commits included in this version can be found here.

Bug fixes

  • Fixed crash of MedaBrowserServiceCompat when multiple MediaBrowserCompat try to connect to it. (aosp/930246)

Version 1.1.0-alpha02

March 13, 2019

androidx.media:media:1.1.0-alpha02 is released. The full list of commits included in this version can be found here.

Bug fixes

  • Fixed crash of MediaBrowserCompat while connecting
  • Fixed IllegalStateException happened in getCurrentBrowserInfo()/getBrowserRootHints()
  • Make MediaBrowserServiceCompat.getCurrentBrowserInfo() return the same RemoteUserInfo instance for the same MediaBrowserCompat in onGetRoot()

Version 1.0.1

Version 1.0.1

January 30, 2019

androidx.media:media 1.0.1 is released.

Bug fixes

  • Fixed bug of an unexpected IllegalStateException while using MediaBrowserCompat.connect() (aosp/858075)

Version 1.0.0

Version 1.0.0-alpha06

December 17, 2018

API changes

Renamed the media.widget package and class names as follows:

  • androidx.media.widget.VideoView2androidx.media2.widget.VideoView
  • androidx.media.widget.MediaControlView2androidx.media2.widget.MediaControlView

Version 1.0.0-alpha01

December 3, 2018

API changes

  • Deprecated two MediaSessionCompat flags:
    • FLAG_HANDLES_MEDIA_BUTTONS
    • FLAG_HANDLES_TRANSPORT_CONTROLS