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);

0 Response to "Turn Android Wifi On/Off"

Posting Komentar