Checking Wi-Fi enabled or not on Android

inforg picture inforg · Jul 6, 2011 · Viewed 40.6k times · Source

What would the code be for checking whether the Wi-Fi is enabled or not?

Answer

Rasel picture Rasel · Jul 6, 2011
WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
if (wifiManager.isWifiEnabled()) {
  // wifi is enabled
}

For details check here