package com.marshalchen.common.commonUtils.networkUtils;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;



public class BasicNetworkUtils {
    public static boolean checkNetwork(Context context) {
        ConnectivityManager conn = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo net = conn.getActiveNetworkInfo();
        if (net != null && net.isConnected()) {
            return true;
        }
        return false;
    }

    public static boolean isWifiConnected(Context context) {
        if (context != null) {
            ConnectivityManager mConnectivityManager = (ConnectivityManager) context
                    .getSystemService(Context.CONNECTIVITY_SERVICE);
            NetworkInfo mWiFiNetworkInfo = mConnectivityManager
                    .getNetworkInfo(ConnectivityManager.TYPE_WIFI);
            if (mWiFiNetworkInfo != null) {
                return mWiFiNetworkInfo.isAvailable();
            }
        }
        return false;
    }
}

@@ -157,16 +157,47 @@
 Info;%0A%0A%0A
+/**%0A * Check network status%0A */
 %0Apublic 
@@ -221,16 +221,120 @@
 kUtils %7B
+%0A%0A    /**%0A     * Check if the device has connected network.%0A     * @param context%0A     * @return%0A     */
 %0A    pub
@@ -664,16 +664,109 @@
 %0A    %7D%0A%0A
+    /**%0A     * Check the network is Wifi or not%0A     * @param context%0A     * @return%0A     */%0A
     publ

Change some network utils