-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implicit Broadcast Receivers Going Away After Android N #62
Comments
Thanks for creating that issue. I didn't know about that. I'll take a closer look at that update in Android N and write a more detailed answer later when I find some time in the nearest days. |
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 |
I've added this issue to the Roadmap. The plan is to implement it for release 0.5.0. I think, 0.3.0 should be released in the nearest days and 0.4.0 should be released shortly after the previous version. I just need to find some time for this. |
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. |
Done. Right now, it's in 'develop' branch. Before next release 'develop' branch is going to be merged into 'master' branch and it will be available. |
Branch 'develop' was merged into 'master' branch. An update will be available in the release of v. 0.5.0. |
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?
Source: https://www.youtube.com/watch?v=VC2Hlb22mZM
XDA has a good TL;DR about this: http://www.xda-developers.com/how-android-n-will-improve-battery-and-memory-management/
The text was updated successfully, but these errors were encountered: