I have never thought that seemingly tiny thing like monitoring network connectivity on a mobile device can be subject to development for at least about one year!
Highlights of this release are as follows:
- added support for the new network monitoring strategy with
NetworkCallbackavailable since Android Lollipop (API 21)
- kept backward compatibility of network monitoring with pre-Lollipop devices
- added possibility to implement custom network monitoring strategy
- made methods responsible for creating Observables static like in original RxJava project
Preconditionsclass verifying correctness of the input parameters
- changed API of Observable responsible for monitoring network from
Connectivityclass containing info about network state, type and name
- added more unit tests
You can read detailed release notes on GitHub.
I hope, this project will make your apps more robust and you won’t be surprised by incorrect network monitoring when your users will upgrade their devices to Android N. The newest Android version is not officially released to all Android devices yet, but it’s already supported by ReactiveNetwork library.