How to enable and disable Wifi in ANDROID?

By | October 5, 2010

The WifiManager can be used to enable and disable wifi. Where ‘enabled’ is a boolean.

WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
wifi.setWifiEnabled(enabled);

One thought on “How to enable and disable Wifi in ANDROID?

Leave a Reply

Your email address will not be published. Required fields are marked *