I'm trying to use the RemoteControlClient class to support the lock screen player with my app. One issue is that setting the transport control flags seems like they don't work properly.
For example I'm trying to just show a play/stop icon no prev/next:
mRemoteControlClient.setTransportControlFlags(
RemoteControlClient.FLAG_KEY_MEDIA_PLAY_PAUSE |
RemoteControlClient.FLAG_KEY_MEDIA_STOP);
This shows a previous icon and pause icon! Why?
To make things even worse when pressing the stop/play button you only receive KEYCODE_MEDIA_PLAY_PAUSE
when you should be getting KEYCODE_MEDIA_STOP
or KEYCODE_MEDIA_PLAY
.
This is frustrating poor development on Android side if I find out I'm doing this correctly.