ThanosFisherman / WifiUtils

Easily Connect to WiFi Networks
Apache License 2.0
731 stars 188 forks source link

BUG: WifiUtils scanWifi scanResults null data #80

Closed adaonder closed 4 years ago

adaonder commented 4 years ago

Hi, if GPS is on, the result(scanResults) comes. If GPS is off, there is no result. Why was the GPS condition added?

Screen Shot 2020-08-06 at 08 40 33

Code: WifiUtils.withContext(Application.getInstance()).scanWifi(scanResults -> { LogUtil.d("scanResults: " + scanResults.size()); ...

ThanosFisherman commented 4 years ago

Yes we've been through this multiple times. It's a requirement by the Android framework to keep your location data on if you want to scan for wifi networks.

More info here