code: public void register() {
      registerNetworkConnectionChangeReceiver();
      registerInternetConnectionChangeReceiver();
  
      if (wifiAccessPointsScanEnabled) {
        registerWifiSignalStrengthChangeReceiver();
        // start WiFi scan in order to refresh access point list
        // if this won't be called WifiSignalStrengthChanged may never occur
        WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
        wifiManager.startScan();
      }
    }
docs: Registers NetworkEvents.
  It should be executed in onCreate() method in activity
  or during creating instance of class extending Application.