diff --git a/Rocklogger.b4a.meta b/Rocklogger.b4a.meta new file mode 100644 index 0000000..4802875 --- /dev/null +++ b/Rocklogger.b4a.meta @@ -0,0 +1,12 @@ +ModuleBookmarks0= +ModuleBookmarks1= +ModuleBookmarks2= +ModuleBreakpoints0= +ModuleBreakpoints1= +ModuleBreakpoints2= +ModuleClosedNodes0=10,11,12,13,14 +ModuleClosedNodes1= +ModuleClosedNodes2= +NavigationStack=Mapmod,Activity_Pause,120,0,Mapmod,matchingsub,74,6,Mapmod,Activity_Create,21,4,Mapmod,Activity_Resume,124,0,Main,printbut_Click,372,0,Visual Designer,rockloggervisual.bal,-100,2,Main,Globals,80,0,Main,pnlpoint_Touch,353,6,Main,pnlcust_Touch,403,6,Mapmod,add_line,88,6 +SelectedBuild=0 +VisibleModules=2,1 diff --git a/Starter.bas b/Starter.bas new file mode 100644 index 0000000..03e45c3 --- /dev/null +++ b/Starter.bas @@ -0,0 +1,60 @@ +B4A=true +Group=Default Group +ModulesStructureVersion=1 +Type=Service +Version=9.801 +@EndOfDesignText@ +#Region Service Attributes + #StartAtBoot: False + #ExcludeFromLibrary: True +#End Region + +Sub Process_Globals + Public rp As RuntimePermissions + Public GPS1 As GPS + Private gpsStarted As Boolean + Public ValidGPS As Boolean + Public Location2 As Location + +End Sub + +Sub Service_Create + GPS1.Initialize("GPS") +End Sub + +Sub Service_Start (StartingIntent As Intent) + Service.StopAutomaticForeground 'Starter service can start in the foreground state in some edge cases. +End Sub + +Public Sub StartGps + If gpsStarted = False Then + GPS1.Start(0, 0) + gpsStarted = True + End If +End Sub + +Public Sub StopGps + If gpsStarted Then + GPS1.Stop + gpsStarted = False + End If +End Sub + +Sub GPS_LocationChanged (Location1 As Location) + CallSub2(Main, "LocationChanged", Location1) + Location2 = Location1 + ValidGPS = True +End Sub + + +'Sub GPS_GpsStatus (Satellites As List) +' CallSub2(Main, "GpsStatus", Satellites) +'End Sub + +Sub Application_Error (Error As Exception, StackTrace As String) As Boolean + Return True +End Sub + +Sub Service_Destroy + StopGps +End Sub