The following will not turn wifi on, if the user has it turned off, right?:
WifiManager manager = (WifiManager)context.getSystemService(
Context.WIFI_SERVICE);
manager.startScan(); <-- !
I want to make sure the wifi isn’t being turned on (if off) when the above is called,
Thanks
Yes, you are correct. The above code will not turn on wifi.
You can however use
setWifiEnabled(true)to enable wi-fi access. You will need to addandroid.permission.CHANGE_WIFI_STATEto your manifest file.