A simple util and example of how to track connectivity changes in Android applications.
In Android Manifest add
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>Call to receive stream
RxNetwork.stream(context)compile 'com.laimiux.rxnetwork:rxnetwork:0.0.4'