WiFiFlutter icon indicating copy to clipboard operation
WiFiFlutter copied to clipboard

[wifi_iot] android - ask permission to connect only once

Open daadu opened this issue 3 years ago • 0 comments

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:

  1. 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.
  2. 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

daadu avatar May 14 '22 12:05 daadu