WiFiFlutter
WiFiFlutter copied to clipboard
[wifi_iot] android - ask permission to connect only once
If the BSSID param is passed, then Android does not ask for user approval - if once approved.
CREDIT: @fernando-s97 came up with this idea at #206, but cause of wrong approach, PR could not be accepted. Alternate solutions for this were discussed there:
There are 2 alternative to this:
- User handles everything - connects to a network with ssid - after connected - gets the bssid of current network and caches it - next time connects with that. This pattern can be mentioned to user in README, and upto him to implement it at Dart level.
- Implicitly doing the above - but will have to "cache" the bssid in persistent storage - so that it works after app restarts (or not could only just use it for current app session) - also give user to disable this behaviour with a flag in connect method, like bool useCachedBSSID=true