At the moment I'm writing a part of code which should connect android device with hidden network (disconnect existing connection and connect to that hidden one) but it doesn't do that and I don't know why.
B4X:
Dim wifi1 As MLwifi
wifi1.saveWifiAP("MyHiddenWiFi",0,"",True)
So this command should add network to list (and it does) but for some reason doesn't want to connect to it.
Like I mentioned before, I can connect to this AP but only when I do it manually form my mobile, only have a problem when I'm using my app. What I have noticed is connection process with my AP(esp8266) need more time then to connection my home router. How can I use Wait For condition just to wait about 5 sec to check if connection with AP is established?
Sub Globals
Private timer1 As Timer
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
timer1.Initialize("Timer1", 5000)
timer1.Enabled = True
End Sub
Sub Timer1_Tick
'here you can add a checking condition
End Sub
Code pauses for 5 seconds then resumes. I've used it in the past o give a remote connection/machine time to do it's thing, the delay time does not really matter.