In the GPS GPSStatus event, I stop GPS, But,GPSStatus is constantly being triggered.
with log file!:BangHead:
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
with log file!:BangHead:
Attachments
Last edited: