Android 4.x RemoteControlClient.setTransportControlFlags() not working?

后端 未结 2 1753
悲&欢浪女
悲&欢浪女 2021-02-14 21:40

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 wor

2条回答
  •  孤街浪徒
    2021-02-14 22:23

    Use the FLAG_KEY_MEDIA_PLAY_PAUSE

    oRemoteControlClient.setTransportControlFlags(RemoteControlClient.FLAG_KEY_MEDIA_PLAY_PAUSE);

    And lie to the RemoteControlClient ;-)

    Tell him the stream is buffering and it will show the stop button!

    oRemoteControlClient.setPlaybackState(RemoteControlClient.PLAYSTATE_BUFFERING);

    Cheers

提交回复
热议问题