I made simple program (using ABWifi) shows the following to me :
1. SSID
2. Is Connected
3. my MAC Address
the program woks good, but the problem is when I disconnect from Wifi network and run the app, it will stay show the last SSID .
BTW, (Is Connected) always return false even when I connected
this is the code :
1. SSID
2. Is Connected
3. my MAC Address
the program woks good, but the problem is when I disconnect from Wifi network and run the app, it will stay show the last SSID .
BTW, (Is Connected) always return false even when I connected
this is the code :
B4X:
Sub Process_Globals
Dim Wifi As ABWifi
End Sub
Sub Globals
Dim btn1 As Button
Dim Timer1 As Timer
Dim lblIsconnected As Label
Dim lblMac As Label
Dim lblSSID As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
End Sub
Sub btn1_Click
Timer1.Initialize("Timer1",2500)
Timer1.Enabled=True
End Sub
Sub Timer1_tick
Dim RES As Boolean
RES = Wifi.ABLoadWifi
If RES = True Then
lblSSID.Text=Wifi.ABGetCurrentWifiInfo.SSID
lblMac.Text=Wifi.ABGetCurrentWifiInfo.MacAddress
If Wifi.ABGetCurrentWifiInfo.IsConnected = True Then
lblIsconnected.Text="Connected"
Else
lblIsconnected.Text="Not Connected"
End If
Else
Msgbox(Wifi.ABWifiLastError,"Error")
End If
Timer1.Enabled=False
End Sub
Last edited: