I want to block my app's ui when there is no network connectivity.
I saw this post about checking network connectivity.
Is there a way to register for a listener with callback "onNetworkLost()"
, "onNetworkAvailable()"
? Instead of creating my own periodic task?