question: public static boolean isWifiConnected ( Context context ) { ConnectivityManager connectivityManager = ( ConnectivityManager ) context . getSystemService ( Context . CONNECTIVITY_SERVICE ) ; NetworkInfo networkInfo = connectivityManager . getActiveNetworkInfo ( ) ; return networkInfo != null && networkInfo . getType ( ) == ConnectivityManager . TYPE_WIFI ; }
target:  This method requires the caller to hold the permission ACCESS_NETWORK_STATE.