Detect connectivity changes on Android 7.0 Nougat when app is in foreground

前端 未结 5 1445
我寻月下人不归
我寻月下人不归 2020-12-17 22:29

Nougat changed the way it handles CONNECTIVITY_CHANGED intents (basically ignoring it, forcing devs to use the job scheduler) so this leaves me wondering:

If I have

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-17 23:15

    In my case I've subscribed to broadcast with CONNECTIVITY_CHANGE filter in Service and it's working.

    How to keep Service alive is another story :)

提交回复
热议问题