Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim Timer_Location As Timer
Dim VLongitude As Double = 0
Dim VLatitude As Double = 0
Dim Velocity As Double
Dim lm As LocationManager
End Sub
Sub Service_Create
lm.Initialize("Location")
Timer_Location.Initialize("TimerLocation",30000) '60 s = 60000 ms
Timer_Location.Enabled=True
End Sub
Sub Location_LocationChanged (Longitude As Double, Latitude As Double, Altitude As Double, Accuracy As Float, Bearing As Float, Provider As String, Speed As Float, Time As Long)
VLongitude = Longitude
VLatitude = Latitude
ToastMessageShow(VLongitude & " / " & VLatitude,False)
End Sub
Sub Location_ProviderDisabled (Provider As String)
'Msgbox("Provider","Provider Disabled")
End Sub
Sub Location_ProviderEnabled (Provider As String)
'Msgbox("Provider","Provider Enabled")
End Sub
Sub Location_StatusChanged (Provider As String, Status As Int)
'Msgbox("Provider: " & Provider & CRLF & "Status: " & Status,"Status Changed")
End Sub
Sub TimerLocation_Tick
'Handle tick events
lm.requestGPSLocation
Log("Request sent...")
End Sub