package info.acidflow.coverguess.broadcast.receivers;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;

/**
 * Created by paul on 06/07/14.
 */
public class NetworkStateChangeReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        boolean isNetworkAvailable = intent.getBooleanExtra( ConnectivityManager.EXTRA_NO_CONNECTIVITY, false );
        int netWorkType = intent.getIntExtra( ConnectivityManager.EXTRA_NETWORK_TYPE, -1 );

    }
}

@@ -194,16 +194,73 @@
 nager;%0A%0A
+import info.acidflow.coverguess.network.NetworkFactory;%0A%0A
 /**%0A * C
@@ -639,16 +639,142 @@
 , -1 );%0A
+        NetworkFactory.setNetworkAvailable( isNetworkAvailable );%0A        NetworkFactory.setCurrentNetworkType( netWorkType );
 %0A    %7D%0A%7D

Set attributes when network change event occurs