private void registerNetworkConnectionChangeReceiver() {
    IntentFilter filter = new IntentFilter();
    filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
    filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
    context.registerReceiver(networkConnectionChangeReceiver, filter);
  }
Unregisters NetworkEvents.
It should be executed in onDestroy() method in activity
or during destroying instance of class extending Application.
network-events-library/src/main/java/com/github/pwittchen/networkevents/library/NetworkEvents.java