Media-Service Notification Seekbar Style
syslogic opened this issue · comments
Version
Media3 1.3.1
More version details
The media-service notification seekbar drag-handle changes it's size, when clicking next.
The Intent
is being constructed alike this:
PendingIntent intent = MediaButtonReceiver.buildMediaButtonPendingIntent(this, PlaybackState.ACTION_SKIP_TO_NEXT);
new NotificationCompat.Action(androidx.media3.session.R.drawable.media3_notification_seek_to_next, "Next", intent);
Which subsequently runs this code on Intent.ACTION_MEDIA_BUTTON
:
if (mExoPlayer.hasNextMediaItem()) {mExoPlayer.seekToNext();}
It also happens, when clicking the "next" button in the ExoPlayer control view.
Devices that reproduce the issue
Motorola G100, Huawei Matepad Pro
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
Start audio playback with a notification, open the notification panel, then click "next".
This happens when clicking media-action "next" in the notification.
But not when the player continues with the next track.
Expected result
The seekbar drag-handle should maintain it's size,
just alike it does when progressing to the next track.
Actual result
The seekbar drag-handle changes it's size, for some unknown reason.
It's unclear, what the drag-handle size means (if there is a cause).
Once it's large, it stays large, when progressing to the next track.
Media
Bug Report
- You will email the zip file produced by
adb bugreport
to android-media-github@google.com after filing this issue.
- The fact that you are using
MediaButtonReceiver.buildMediaButtonPendingIntent
tells me that your receiver is frommedia1
library (MediaButtonReceiver) instead ofmedia3
(MediaButtonReceiver). Although you mention usingMedia3 1.3.1
?
Have you taken a look at: https://developer.android.com/media/legacy/media-buttons?
- Unfortunately, it is SystemUI that is responsible for rendering that seekbar. You can see the Media3 side of things in DefaultMediaNotificationProvider -- which can be customized or replaced by an app. There are no properties for us to send to manipulate the layout of the notification. Also, above API 31, the notification is ignored completely and SystemUI renders the UMO notification based on the Session properties.