Private Sub flp_LocationChanged (Location1 As Location)
If DateTime.Now > LastUpdateTime + 10 * DateTime.TicksPerSecond Then
Private b As Beeper
b.Initialize(300, 1000) '300 milliseconds, 500 hz
b.Beep
End If
End Sub
I put my phone on a table, every 10 secs, it beep a sound.
It seem that even phone location was not changed, this event is always triggered.
Private Sub flp_LocationChanged (Loc As Location)
If Tag = 0 Then
Tag = 1
LogColor(Loc.Latitude,Colors.Green)
LogColor(Loc.Longitude,Colors.Green)
LogColor(Loc.Accuracy,Colors.Green)
LogColor(Loc.Speed,Colors.Green)
Else
Tag = 0
LogColor(Loc.Latitude,Colors.Yellow)
LogColor(Loc.Longitude,Colors.Yellow)
LogColor(Loc.Accuracy,Colors.Yellow)
LogColor(Loc.Speed,Colors.Yellow)
End If
End Sub
The phone was on the table and not moved, on log windows, latitude & longitude were exactly the same, but the event still triggered.
Speed showed : 0
Accuracy showed : 16
Could it be because GPS signal got disconnected due to weak signal and then connected again when signal got stronger again?
Private Sub CreateLocationRequest As LocationRequest
Dim lr As LocationRequest
lr.Initialize
lr.SetSmallestDisplacement(100) '<-------------- add this line
lr.SetInterval(10000)
lr.SetFastestInterval(lr.GetInterval / 2)
Return lr
End Sub