Why BroadcastReceiver works even when app is in background ?

后端 未结 9 924
感动是毒
感动是毒 2020-12-04 13:59

I am checking Internet connectivity in my app using BroadcastReceiver and I show an alert dialog if the connection is lost. It works fine. But my problem is that BroadcastRe

9条回答
  •  我在风中等你
    2020-12-04 14:10

    I think you will have to make sure that you are not using the receiver when app is in background. For that you will have to use every activities onPause() and onResume() methods.

提交回复
热议问题