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.
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 -1If 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?