Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implicit Broadcast Receivers Going Away After Android N #62
Apparently, Implicit Broadcast Receivers are going away in Android O. 3 of them are already gone in N, which includes the CONNECTIVITY_CHANGE broadcast.
I looked into your code and you don't seem to be using that (rather, you create an instance of a generic broadcast receiver and always call the ConnectivityManager for every broadcast received from it), but it's possible your current method of calling for connectivity changes could still be gone in Android N? Google recommends using the JobScheduler API instead (however, you can only use this starting in API 21...).
I'm thinking that releases should consider using the JobScheduler API instead for listening to connectivity changes (with a shim for using the current broadcast receiver below API 21). What do you think?
XDA has a good TL;DR about this: http://www.xda-developers.com/how-android-n-will-improve-battery-and-memory-management/
I quickly browsed docs and I can give you a short answer. As far as I see in the documentation, Google Developers extended
You asked about
Wow, thanks for the immediate reply and possible solutions!
Based on your current reply, I was thinking that since NetworkCallback class started at API 21, I was thinking that perhaps instead of using the new solution for N+... should the new strategy start with devices with API 21 (L) instead?
Also, I'm willing to devote my time to improve the library :)
Yeah, I was thinking about
Side note: additional code snippet with usage of NetworkCallback: http://www.programcreek.com/java-api-examples/index.php?api=android.net.Network
There's a new branch created for this task named 'issue-62' from 'develop' branch.