Network Changed Broadcast Receiver does not execute in One Plus Phones

后端 未结 5 854
不知归路
不知归路 2021-01-21 06:47

I have a BroadcastReciever name NetworkReciver.java that executes when Internet is Connected or Disconnected. And it is working well.

But when

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-21 06:49

    Starting in Android N, the system does not send CONNECTIVITY_ACTION broadcasts to manifest receivers of applications targeting N+.

    Explicit BroadcastReceivers registered via Context.registerReceiver() continue to receive these broadcasts.

    Solution: See ConnectivityManager.CONNECTIVITY_ACTION deprecated

提交回复
热议问题