Hi,
I am creating a program that records gps settings but inside some buildings we cant get a gps signal so i want use Abwifi library to get the data.
How do i tell the gps to stop searching and use the wifi. because at the moment it just keeps on trying to get a signal.
this the code that i am using but just cant figure out what to do.
Please point me in the right direction.
I understand that trying to use accuracy is probably not going to work. Would a timer work & if so can someone provide an example of the syntax required:sign0085:
I am creating a program that records gps settings but inside some buildings we cant get a gps signal so i want use Abwifi library to get the data.
How do i tell the gps to stop searching and use the wifi. because at the moment it just keeps on trying to get a signal.
this the code that i am using but just cant figure out what to do.
Please point me in the right direction.
I understand that trying to use accuracy is probably not going to work. Would a timer work & if so can someone provide an example of the syntax required:sign0085:
B4X:
Sub GPS_LocationChanged (Loc As Location)
Currentloc = Loc
Longitude = Loc.Longitude
Latitude = Loc.Latitude
count = count + 1
If Loc.Accuracy <=100 Then
Dim now As Long
now = DateTime.now
DateTime.DateFormat = "dd/MM/yyyy"
Dim edtdate, edttime, edtdatetime As String
edtdate = DateTime.Date(now)
edttime= DateTime.Time(now)
aa = edtdate
bb = edttime
edtdatetime = aa &"-"& bb
c = edtdatetime
Dim lat, lon As Double
lon = Currentloc.Longitude
lat = Currentloc.Latitude
Dim req As HttpRequest
sendrequest = "http://thexspots.webege.com/netdb.php?action=addgps&lat="
req.InitializeGet(sendrequest & lat & "&lon=" & lon &"&deviceID=" & deviceID & "&reddt="& c)
httpC.Execute(req, 1)
GPS1.Stop
End If
If Loc.Accuracy >100 Then
Dim now As Long
now = DateTime.now
DateTime.DateFormat = "dd/MM/yyyy"
Dim edtdate, edttime, edtdatetime As String
edtdate = DateTime.Date(now)
edttime= DateTime.Time(now)
aa = edtdate
bb = edttime
edtdatetime = aa &"-"& bb
c = edtdatetime
Dim lat, lon As Double
Dim ResLocation As ABFoundLocation
myWifi.ABGetLocation("myWifi")
lon = ResLocation.Longitude
lat = ResLocation.Latitude
Dim req As HttpRequest
sendrequest = "http://thexspots.webege.com/netdb.php?action=addgps&lat="
req.InitializeGet(sendrequest & lat & "&lon=" & lon &"&deviceID=" & deviceID & "&reddt="& c)
httpC.Execute(req, 1)
GPS1.Stop
End If
If count >10 Then
GPS1.Stop
Return
End If
If count Mod 5 = 0 Then
ToastMessageShow("Locating..." & count, True)
End If
GPS1.Stop
End Sub