once10301 / wifi

MIT License
32 stars 55 forks source link

[Android] Can not connect to wifi already connect before. #42

Open qhu91it opened 4 years ago

qhu91it commented 4 years ago

Step1: Open android wifi system setting, connect to wifi A and leaver (not forget) Step2: Open app and connect to wifi A, function wifiManager.addNetwork(wifiConfig); alway return -1

If I forget wifi A and go to app connect then it will connect success.

If wifi A already connect before, in Android 8 and below wifiManager.getConfiguredNetworks() can return this wifi A so I can get netId to enable but in Android 10 is not return anything, Android 9 not tested because I don't have.

Any idea?

Kamoba commented 3 years ago

Noticed this issue also, i just display a message to user saying "go to settings and forget it..." until a fix release.