Android MediaSession:如何选择锁定屏幕上显示的图标?
我有一个通过MediaSessionCompat
播放媒体的应用程序。
我使用notificationcompat
为通知抽屉创建通知,然后使用notification managercompat.notify
发布通知,看起来很棒。 (请参阅屏幕截图。)
我的问题是锁定屏幕。它仅显示播放,上一个曲目和下一个曲目图标。 我缺少在当前播放轨道中向后跳回去的控件。(请参阅屏幕截图。)
我正在使用mediaSession.setplaybackstate
指定可用操作,我包括playbackStateCompat
的所有适当的,用于倒带,快速前进,跳到上一个,然后跳到下一个。
锁定屏幕的配置与通知不同吗?还是开发人员对这里提供的控件的控制权较少?
先感谢您!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论