Android Question Wifi Library 1.2

PABLO2013

Active Member
Licensed User
I need to place the information in a textbox or label , not a message, the idea is a continuous reading of the data , I have tried but the information is not updated (use the timer function)


Example:

Sub Button1_Click

Dim r As Boolean
Dim a As Int
r = myWifi.ABLoadWifi()
If r = True Then
  • Msgbox (myWifi.ABGetCurrentWifiInfo().SSID, "")
For a = 0 To myWifi.ABNumberOfAvailableWifiNetworks - 1
  • Msgbox (myWifi.ABGetWifiNetwork(a).SSID & " " & myWifi.ABGetWifiNetwork(a).Level, "")
Next
Else
  • Msgbox(myWifi.ABWifiLastError,"")
End If
End Sub

TKS
 

Peter Simpson

Expert
Licensed User
Please try this @PABLO2013,
Also please remember to place all posted code in between [ Code ] and [ /Code ] but without spaces, cheers...
B4X:
'Here you go try this
Sub Activity_Resume
    Dim LblCurrentWifiInfo, WifiNetwork As Label
        LblCurrentWifiInfo.Initialize(Null)
        WifiNetwork.Initialize(Null)
       
    Activity.AddView(LblCurrentWifiInfo, 0dip, 0dip, 100%x, 40dip)
    Activity.AddView(WifiNetwork, 0dip, 50dip, 100%x, 40dip)
       
    Dim r As Boolean   
        r = myWifi.ABLoadWifi()
   
    If r = True Then
        'Msgbox (myWifi.ABGetCurrentWifiInfo().SSID, "")
        LblCurrentWifiInfo.Text = myWifi.ABGetCurrentWifiInfo().SSID
       
        Dim a As Int
        For a = 0 To myWifi.ABNumberOfAvailableWifiNetworks - 1
            'Msgbox (myWifi.ABGetWifiNetwork(a).SSID & " " & myWifi.ABGetWifiNetwork(a).Level, "")
            WifiNetwork.Text = myWifi.ABGetWifiNetwork(a).SSID & " " & myWifi.ABGetWifiNetwork(a).Level
        Next
    Else
        Msgbox(myWifi.ABWifiLastError,"")
    End If
End Sub
 
Last edited:
Top