Media
Latest Update | Current Stable Release | Next Release Candidate | Beta Release | Alpha Release |
---|---|---|---|---|
December 2, 2020 | 1.2.1 | - | - | - |
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.2.1" }
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.
See the Issue Tracker documentation for more information.
Version 1.2.1
Media Version 1.2.1
December 2, 2020
androidx.media:media:1.2.1
is released. Version 1.2.1 contains these commits.
Bug Fixes
- Fix NPE after calling
MediaSessionCompat#setCallback(null)
in API 27
Version 1.2.0
Version 1.2.0
September 16, 2020
androidx.media:media:1.2.0
is released. Version 1.2.0 contains these commits.
Major changes since 1.1.0
- Added support for
AudioAttributesCompat#setLegacyStreamType
for SDK < 21 - Support volume control for the
androidx.mediarouter
library - Better support of interoperability between
androidx.media
andandroidx.media2
Version 1.2.0-rc01
September 2, 2020
androidx.media:media:1.2.0-rc01
is released with no changes since 1.2.0-beta01
. Version 1.2.0-rc01 contains these commits.
Version 1.2.0-beta01
August 19, 2020
androidx.media:media:1.2.0-beta01
is released. Version 1.2.0-beta01 contains these commits.
New Features
- Added support for
AudioAttributesCompat#setLegacyStreamType
for API Leves Pre-21
API Changes
- Added
MediaConstants#PLAYBACK_STATE_EXTRAS_KEY_MEDIA_ID
for the media id inPlaybackStateCompat
extras, which is expected to be same asMediaMetadataCompat#METADATA_KEY_MEDIA_ID
of the current metadata.
Bug Fixes
- Fixed an issue with
AudioAttributesCompat.Builder#setContentType
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()
ofRemoteUserInfo
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 aRemoteException
- 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 toLIBRARY_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
toNullPointerException
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 multipleMediaBrowserCompat
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 ingetCurrentBrowserInfo()
/getBrowserRootHints()
- Make
MediaBrowserServiceCompat.getCurrentBrowserInfo()
return the sameRemoteUserInfo
instance for the sameMediaBrowserCompat
inonGetRoot()
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.VideoView2
→androidx.media2.widget.VideoView
androidx.media.widget.MediaControlView2
→androidx.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