Hello. I'm just trying to get started with the simple wifi example. I can't see what I have got wrong with this simple example of just scanning wifi networks. The Scan_ScanDone event doesn't happen. What have I missed?
B4X:
Sub Class_Globals
Dim wifi As MLwifi
Dim scan As MLScan
Private Root As B4XView
Private xui As XUI
Private btnDiconnect As Button
Private btnScan As Button
Private wifilist As List
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
wifi.EnableWifi(True)
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub Scan_ScanDone(Results() As String, Count As Int)
Dim tmp As String
For i = 0 To Count - 1
tmp = Results(i).Replace(","," ")
wifilist.Add(tmp)
Next
End Sub
Private Sub btnScan_Click
scan.startScan("Scan")
End Sub