How to use MediaSessionCompat and keep backward compatibility with RemoteControlClient?

后端 未结 1 1806
予麋鹿
予麋鹿 2021-01-02 12:59

I want to replace my android RemoteControlClient class in my application with a new one using MediaSession, but that not working with API level < 21, MediaSessionCompat s

相关标签:
1条回答
  • 2021-01-02 13:19

    As of revision 22 of the Support-v4 library, the source code for MediaSessionCompat shows that it now will automatically register and use a RemoteControlClient in API 14-20 devices before switching to MediaSession on API21+ devices.

    0 讨论(0)
提交回复
热议问题