5

I have an app that plays media via MediaSessionCompat.

I create a notification for the Notification Drawer using NotificationCompat and post it using NotificationManagerCompat.notify, and it looks great. (See screenshot.)

My problem is with the lock screen. It only shows Play, Previous Track, and Next Track icons. I'm missing the controls to jump back and forward within the currently playing track. (See screenshot.)

I'm using MediaSession.setPlaybackState to specify the actions that are available, and I am including all the appropriate ones from PlaybackStateCompat for rewind, fast forward, skip to previous, and skip to next.

Is the lock screen configured differently than the notification? Or do developers simply have less control over the controls provided here?

Thank you in advance!

enter image description here

enter image description here

Brian Rak
  • 4,912
  • 6
  • 34
  • 44
  • I'm adding a little more information here in the hopes it might help someone. I installed Pandora on this same phone just to see what they were doing, and sure enough, they offer much richer options via the Notification Drawer than via the lock screen. (The lock screen only shows a grayed out skip back button, a play button, and a skip forward button, whereas the Notification Drawer shows thumbs up, thumbs down, replay, play, and skip forward.) So it looks like the OS just decides on its own what to show on the lock screen. – Brian Rak Jun 22 '22 at 01:47

0 Answers0