Broadcast receiver highest priority not working

后端 未结 4 1544
猫巷女王i
猫巷女王i 2021-01-05 01:09

I\'m doing an application using ACTION_MEDIA_BUTTON handler, but it appears it is always intercepted by MX Player or Apollo and I get no Intent

I\'ve tried both 1000

4条回答
  •  生来不讨喜
    2021-01-05 02:00

    First of all, you shouldn't register the receiver in code if it's already mentioned in the manifest. Then, the name of the receiver is invalid, it should either be a full class name, or the shorthand, which will be appended to the application package name. In case if BCreceiver is in the main package, the attribute value should be ".BCreceiver". Last mention is that you shouldn't really change the priority, there is no such thing as intercepting a broadcast in Android (as far as I know), so all BroadcastReceivers subscribed to an action will receive the broadcast when it's fired. Try these fixes and update your question.

提交回复
热议问题