Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A new version, 1.2.0, of the android media library was just released. This release includes several fixes that are relevant to androidx/media#167, which seems to be the root cause of some issues we've been seeing in production, particularly on Samsung devices. Among many other changes, the release notes for 1.2.0 say this: "Use only android.media.session.MediaSession.setMediaButtonBroadcastReceiver() above API 31 to avoid problems with deprecated API on Samsung devices (androidx/media#167)." I'm hopeful that upgrading to 1.2.0 will resolve our issues in production. We'll be able to monitor the impact of the upgrade using crashlytics (see #91).
Upgrading to 1.2.0 also required upgrading our
targetSdk
to version 34. This was straightforward, it just required adding one more permission that is now required by Android for playing media in a foreground service. I also updated thecom.google.android.material
library for good measure as it was slightly out of date; this shouldn't have any noticeable impact.