ExoPlayer device volume handling relies on non-public, unreliable API
@tianyif is already working on this.
Since May 7, 2025.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 1.6.1
More version details
No response
Devices that reproduce the issue
N/A
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
No
Reproduction steps
ExoPlayer tracking of device volume for Player.COMMAND_GET_DEVICE_VOLUME relies on a non-public and evidently unreliably framework API: android.media.VOLUME_CHANGED_ACTION. This prevents reasonable and dependable implementation of COMMAND_GET_DEVICE_VOLUME.
The referenced issuetracker entry is non-public, but I found another: https://issuetracker.google.com/issues/333967641. The issue is P4, so in its present state it will likely be closed as "obsolete" and re-filed a dozen more times.
Can the media3 team raise the issue's urgency via internal Google channels to address the problem?
Evidence of the non-public Intent's lack of reliability stems from the linked stackoverflow issue and similar ones: https://stackoverflow.com/questions/11318933/listen-to-volume-changes-events-on-android/
Looking at the non-public Intent in AudioManager reveals that there may be a need to make another Intent public, android.media.STREAM_MUTE_CHANGED_ACTION. Documentation for VOLUME_CHANGED_ACTION does not suggest that it reflects changes in stream mute state.
Expected result
N/A
Actual result
N/A
Media
N/A
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.