Why does ACTION_MEDIA_BUTTON fail to process events?

为君一笑 提交于 2019-12-02 03:21:29

Do you happen to use Library Project to implement this?

If so, which manifest did you put the <receiver> in? The library's or the application's?

If you put in the library's, it won't work. You must place this in the application's manifest:

<receiver android:name=".RemoteControlReceiver">
    <intent-filter>
        <action android:name="android.intent.action.MEDIA_BUTTON" />
    </intent-filter>
</receiver>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!