ThanosFisherman / WifiUtils

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

when I connect the network , WifiUtils will scan the wifis #109

Open xumengyin opened 3 years ago

xumengyin commented 3 years ago

hi Guy ,thanks you Lib,but I have question.when I connect the network , WifiUtils will scan the wifis ,but Android has restrictions on scanning wifi, So I can not connect the netWork because scan wifi failed . So myQuestion is it necessary to scan wifi for connect Network

ThanosFisherman commented 3 years ago

Hello,

At the moment WiFIUtils performs a scan before connecting to a wifi and there is currently no way to override this behavior.

This was a design choice back in the day when android wouldn't impose throttling on wifi scanning.

It is a good idea to deprecate that behavior now. Hopefully I will get around to it as soon as I find some time.

ansuman87 commented 2 years ago

Hi @ThanosFisherman , Does that mean neither the wifi-scan function nor connecting to a network(for known SSIDs) function will work on Android 10? Basically, is this library not suitable for Android 10? I have throttling wifi scans disabled on my Android and still it's not working.

Thank you!