BroadcastReceiver declared in manifest is not receiving the Broadcast

前端 未结 7 1887
余生分开走
余生分开走 2020-12-30 04:30

I\'ve tried to register a Wifi BroadcastReceiver to get the wifi state when it changes. But so far I have no luck receiving the broadcast.



        
7条回答
  •  别那么骄傲
    2020-12-30 05:06

    Just because the broadcast was send with flag Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT, it means, your app must register this receiver before android boot up, which can only be the system services.

提交回复
热议问题