Small icon is not visible in status bar on API 30+ when MediaStyle is set in notification
Media3 Version
Media3 1.0.1
Devices that reproduce the issue
Pixel 5 v12.0 no icon Galaxy S22 v12.0 no icon
Galaxy S21 v11.0 no icon Moto G71 5G v11.0 no icon
Galaxy S20 v10.0 icon visible Moto G9 Play v10.0 icon visible
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
The issue can be reproduced in UAMP: Android Media Player (branch media3 and main)
I found the reason during a long time of debugging.
Let's reproduce with UAMP media3 branch. For displaying notifications is used DefaultMediaNotificationProvider
If I comment this line DefaultMediaNotificationProvider.java#L370 icon will be visible in status bar.
Note: the issue is old. Before migrating to media3 the same was in PlayerNotificationManager when mediaSession is set to MediaStyle PlayerNotificationManager.java#L1246 If comment this line icon becomes visible.
Expected result
Icon should be visible
Actual result
Icon is not visible in API 30+
Media
N/A
Bug Report
- [ ] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
Starting with Android 11/API 30 a mini player with media controls is created for each media style notification and the icon isn't displayed in the status bar for such notification. Instead media notifications are placed in a carousel. Please find the blog post that announced that change that says: The small icon and app name are shown in the upper left of the media controls.
https://android-developers.googleblog.com/2020/08/playing-nicely-with-media-controls.html
Closing as this is answered and there was no further activity.