Bug? Mlwifi Problems

fabian

Member
Licensed User
Longtime User
I have problems with the mlwifi library.
I can't delete the registered networks. This is my code, am I doing something wrong? My sdk = 29 and I use android 10 . I tried other sdk and other android versions but it doesn't work. Is there any other way to do this? Thanks in advance .
My code:

Dim wifi_scan As MLScan
Dim wifi As MLwifi
Dim sListSSIDS As List
Dim sRed() As String

sListSSIDS =wifi_scan.listSavedNetworks
For i=0 To sListSSIDS.Size - 1
Log(sListSSIDS.Get(i))
sRed = Regex.Split( ",", sListSSIDS.Get(i))
ssid=sRed(0).Replace(QUOTE ,"")
If ssid<>"drsoft_demo" Then
wifi.removeWifiAP ( ssid )
End If
Next
Return
 

DonManfred

Expert
Licensed User
Longtime User
as far as i know you only can remove a network which you added.
 

toby

Well-Known Member
Licensed User
Longtime User
What's the error?

It's recommended to use the latest version of b4a.
 

fabian

Member
Licensed User
Longtime User
Thank you Don Manfred for your answer. It doesn't give an error, it just doesn't delete the saved networks.
Two other problem is that if I run this:

wifi.connectWifiAP( "MyWiFI , ifi.SECURITY_WPA2PSK, "MyPass", 20000)
wait for Wifi_ConnectionResult (Success As Boolean)

1) the program continues its execution in activity_resume after press connection button,
2) Then If I exit of Program and re-enter to program the Wi-Fi is not connected to the specified network .
 
Top