media icon indicating copy to clipboard operation
media copied to clipboard

Small icon is not visible in status bar on API 30+ when MediaStyle is set in notification

Open picklepickle1 opened this issue 3 years ago • 2 comments

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 Screenshot 2023-05-12 at 20 03 05

Actual result

Icon is not visible in API 30+ Screenshot 2023-05-12 at 19 59 07

Media

N/A

Bug Report

  • [ ] You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

picklepickle1 avatar May 12 '23 17:05 picklepickle1

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

marcbaechinger avatar May 12 '23 20:05 marcbaechinger

Closing as this is answered and there was no further activity.

marcbaechinger avatar Jun 01 '23 20:06 marcbaechinger