B4A=true Group=Default Group ModulesStructureVersion=1 Type=Service Version=9.85 @EndOfDesignText@ #Region Service Attributes #StartAtBoot: False #ExcludeFromLibrary: True #End Region Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Public rp As RuntimePermissions Dim reqManager As DBRequestManager Dim DBReqServer As String = "http://keymon.lat:1787" '"http://keymon.lat:1782" "http://10.0.0.205:1782" "http://keymon.lat:1783" "http://11.0.0.48:1783" ""' CAMBIAR HACIA AFUERA O DENTRO DE LA OFNA ' Dim server As String = "http://10.0.0.205:1782" Dim rutaBD As String = File.DirInternal Dim skmt As SQL Dim almacen As String Dim GPS As GPS Public rp As RuntimePermissions Public FLP As FusedLocationProvider Private flpStarted As Boolean Dim latitud As Double = 0 Dim longitud As Double = 0 Dim ubicacionActual As Location End Sub Sub Service_Create 'This is the program entry point. 'This is a good place to load resources that are not specific to a single activity. GPS.Initialize("GPS") ubicacionActual.Initialize End Sub Sub Service_Start (StartingIntent As Intent) Service.StopAutomaticForeground 'Starter service can start in the foreground state in some edge cases. Subs.revisaBD reqManager.Initialize(Me, DBReqServer) If Not(skmt.IsInitialized) Then skmt.Initialize(rutaBD, "kmt.db", True) End Sub Sub Service_TaskRemoved 'This event will be raised when the user removes the app from the recent apps list. End Sub Sub Service_Destroy End Sub