android-notification.mediastyle

Android: NotificationCompat.MediaStyle action buttons don't do anything

可紊 提交于 2021-01-27 18:20:48
问题 I've got a simple Android app containing one Activity and a Service that derives from MediaBrowserServiceCompat . I've successfully gotten it set up to play audio from my main activity by using MediaBrowserCompat and MediaControllerCompat . It can even play and pause the audio from my Bluetooth headphones. All good. My challenge concerns the NotificationCompat.MediaStyle notification that appears on the lock screen and in the notifications tray. The notification appears properly. However,