#Region Module Attributes
#FullScreen: False
#IncludeTitle: True
#ApplicationLabel: LocationManager
#VersionCode: 1
#VersionName:
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim lm As LocationManager
End Sub
Sub Activity_Create(FirstTime As Boolean)
lm.Initialize("Location")
Activity.AddMenuItem("Update location","mnuLocation")
Activity.AddMenuItem("Stop Listening","mnuStopListening")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub mnuLocation_Click
lm.requestGPSLocation
End Sub
Sub mnuStopListening_Click
lm.stopGPSListening
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)
Msgbox("Longitude: " & Longitude & CRLF & "Latitude: " & Latitude & CRLF & "Altitude: " & Altitude & CRLF & "Accuracy: " & Accuracy & CRLF & "Bearing: " & Bearing & CRLF & "Speed: " & Speed,"Location")
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