Unregistering Android Broadcast Receiver in onReceive throws “Receiver not registered”

前端 未结 7 875
半阙折子戏
半阙折子戏 2020-12-15 04:13

I have a BroadcastReceiver for one time use.

I\'m registering it in an Activity. I can\'t put the unregisterReceiver() in onPause

7条回答
  •  孤城傲影
    2020-12-15 05:03

    Maybe the issue is that you are trying to unregister the receiver from the receiver's context, instead of the context where it was originally registered.

提交回复
热议问题