private void registerConnectivityReceiver ( ) { IntentFilter intentFilter = new IntentFilter ( ) ; intentFilter . addAction ( ConnectivityManager . CONNECTIVITY_ACTION ) ; context . registerReceiver ( connectivityReceiver , intentFilter ) ; }
Registers receiver to be notified of broadcast event when network connection changes