Here you can find the source of isConnectedWifi(Context context)
public static boolean isConnectedWifi(Context context)
//package com.java2s; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; public class Main { public static boolean isConnectedWifi(Context context) { NetworkInfo info = getNetworkInfo(context); return isConnected(info) && info.getType() == ConnectivityManager.TYPE_WIFI; }/*from w ww. jav a2s . co m*/ public static NetworkInfo getNetworkInfo(Context context) { ConnectivityManager cm = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); return cm.getActiveNetworkInfo(); } public static boolean isConnected(Context context) { NetworkInfo info = getNetworkInfo(context); return isConnected(info); } public static boolean isConnected(NetworkInfo info) { return info != null && info.isConnected(); } }