Feb 24, 2011

Turn Android Wifi On/Off

To turn Wifi ON:
    WifiManager wifiManager = (WifiManager)getBaseContext().getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(true);


To turn Wifi OFF:
    WifiManager wifiManager = (WifiManager)getBaseContext().getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(false);

3 comments:

Infolinks In Text Ads