ThanosFisherman / WifiUtils

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

Disable auto reconnecting #69

Open AlirezaGhanbarinia opened 4 years ago

AlirezaGhanbarinia commented 4 years ago

I use the latest disconnect feature it works OK on most devices, but If the user enable the auto reconnecting option, it will automatically connect to WiFi after disconnect the WiFi.

Is it possible that the connection will not be restored automatically after disconnecting the WiFi connection, or will the option of automatic connection for all the surrounding WiFi be disabled?

eliaslecomte commented 4 years ago

Maybe use the remove feature then? It will disconnect & remove.

JavaDeveloper08 commented 3 years ago

I have same problem, I didn't understand "remove feature". Please, would you give detail ?

z3ntu commented 3 years ago

I'm pretty sure this is meant: WifiUtils.withContext(context).remove(ssid, listener) My use case is connecting temporarily to a WiFi to configure something on the WiFi and then disconnect, but just disconnecting made the phone reconnect immediately. Removing the WiFi is the proper solution for my use case.