Checking the Networking Connectivity using BroadcastReceiver in Android

前端 未结 2 611
长情又很酷
长情又很酷 2020-12-02 21:37

I am using the BroadcastReceiver to check the network connectivity while my app is running.I have binded the BroadcastReceiver with the Activity inorder to bring few contro

2条回答
  •  隐瞒了意图╮
    2020-12-02 22:07

    Flo's option one is correct for making Broadcast Receiver global by including in manifest file. there is another option is, make a activity as base activity and extends all your activity with this and register you receiver in base activity.

提交回复
热议问题