Good evening,
I was testing ABWifi lib, v 1.2, with the following code:
The problem is that at some time I received the second message box with my coords right.
But now, I'm only getting 0 - 0 values with the first message box, and the second doesn't appear.
I really know I'm doing something wrong.
Can someone please help me out?
Kind regards,
Kepler
I was testing ABWifi lib, v 1.2, with the following code:
B4X:
Sub Process_Globals
Dim lat As Double
Dim lon As Double
End Sub
Sub Globals
Dim MyWifi As ABWifi
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim r As Boolean
r = MyWifi.ABLoadWifi()
r = MyWifi.ABGetLocation("MyWifi")
If r = False Then
r = MyWifi.GetLastKnownLocation("MyWifi")
If r = False Then
Msgbox (MyWifi.ABWifiLastError(), "")
End If
End If
Msgbox ("" & lat & " - " & lon, "")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub MyWifi_FoundLocation ()
Dim ResLocation As ABFoundLocation
ResLocation = MyWifi.ABGetFoundLocation()
lat = ResLocation.Latitude
lon = ResLocation.Longitude
Msgbox ("" & ResLocation.Latitude & " - " & ResLocation.Longitude, "")
End Sub
The problem is that at some time I received the second message box with my coords right.
But now, I'm only getting 0 - 0 values with the first message box, and the second doesn't appear.
I really know I'm doing something wrong.
Can someone please help me out?
Kind regards,
Kepler