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();
    }
  }
Registers NetworkEvents.
It should be executed in onCreate() method in activity
or during creating instance of class extending Application.
network-events-library/src/main/java/com/github/pwittchen/networkevents/library/NetworkEvents.java