Android 判断wifi是否链接
public static boolean isWifiConnected(Context context) {
NetworkInfo net = getConnectivityManager(context).getActiveNetworkInfo();
return net != null && net.getType() == ConnectivityManager.TYPE_WIFI && net.isConnected();
}