Posts

Showing posts with the label WiFi

Turn on /off WiFi sketchware

Image
Hello Amigos, i hope you are doing well Sorry for the late, Like, share and subscribe for more videos  Code used : final android.net.wifi.WifiManager wifi = (android.net.wifi.WifiManager)getSystemService(Context.WIFI_SERVICE); if (wifi.isWifiEnabled()) { wifi.setWifiEnabled(false); showMessage("Wifi Disable"); } else { wifi.setWifiEnabled(true); showMessage("Wifi Enable"); } // add permission <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />