In the GPS GPSStatus event, I stop GPS, But,GPSStatus is constantly being triggered.
B4X:
Sub GPS_LocationChanged (Location1 As Location)
lastKnownLocation = Location1
isGPSFix=True
End Sub
Sub GPS_GpsStatus (Satellites As List)
Log("进入GPSStatus事件...")
If isGPSFix=True Then
WriteLogDB("OK")
StopGPS
Else
'location timeout
If (DateTime.Now-startTimeMillis>1000*60) Then
WriteLogDB("Time out!")
StopGPS
End If
End If
End Sub
Sub StopGPS
isGPSFix=False
gps1.Stop
End Sub
I sure StopGPS Executes! look gpslog.txt. at 176 record, Generate a log record per second.in fact,A log record for each fifth of the clock generator is correct.
176:record no
460036431403219:IMSI
0,0:Longitude,Latitude
2011-12-09 06:16:55.000:Service start time,program begin get GPS position.
2011-12-09 06:17:56.000:End service time.
定位超时:time out
From this record, the system becomes once per second to take the location information. this is error!