Android examples for android.net.wifi:Wifi Enable
is Wifi Enabled
import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.wifi.WifiManager; public class Main{ public static boolean isWifiEnabled(Context context) { WifiManager mWifiManager = (WifiManager) context .getSystemService(Context.WIFI_SERVICE); return mWifiManager.isWifiEnabled(); }/*from ww w . j ava2s .c o m*/ }