package SHARK2.keymon.com.mx;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.objects.ServiceHelper;
import anywheresoftware.b4a.debug.*;

public class starter extends android.app.Service{
	public static class starter_BR extends android.content.BroadcastReceiver {

		@Override
		public void onReceive(android.content.Context context, android.content.Intent intent) {
            BA.LogInfo("** Receiver (starter) OnReceive **");
			android.content.Intent in = new android.content.Intent(context, starter.class);
			if (intent != null)
				in.putExtra("b4a_internal_intent", intent);
            ServiceHelper.StarterHelper.startServiceFromReceiver (context, in, true, anywheresoftware.b4a.ShellBA.class);
		}

	}
    static starter mostCurrent;
	public static BA processBA;
    private ServiceHelper _service;
    public static Class<?> getObject() {
		return starter.class;
	}
	@Override
	public void onCreate() {
        super.onCreate();
        mostCurrent = this;
        if (processBA == null) {
		    processBA = new anywheresoftware.b4a.ShellBA(this, null, null, "SHARK2.keymon.com.mx", "SHARK2.keymon.com.mx.starter");
            if (BA.isShellModeRuntimeCheck(processBA)) {
                processBA.raiseEvent2(null, true, "SHELL", false);
		    }
            try {
                Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
            processBA.loadHtSubs(this.getClass());
            ServiceHelper.init();
        }
        _service = new ServiceHelper(this);
        processBA.service = this;
        
        if (BA.isShellModeRuntimeCheck(processBA)) {
			processBA.raiseEvent2(null, true, "CREATE", true, "SHARK2.keymon.com.mx.starter", processBA, _service, anywheresoftware.b4a.keywords.Common.Density);
		}
        if (!true && ServiceHelper.StarterHelper.startFromServiceCreate(processBA, false) == false) {
				
		}
		else {
            processBA.setActivityPaused(false);
            BA.LogInfo("*** Service (starter) Create ***");
            processBA.raiseEvent(null, "service_create");
        }
        processBA.runHook("oncreate", this, null);
        if (true) {
			if (ServiceHelper.StarterHelper.runWaitForLayouts() == false) {
                BA.LogInfo("stopping spontaneous created service");
                stopSelf();
            }
		}
    }
		@Override
	public void onStart(android.content.Intent intent, int startId) {
		onStartCommand(intent, 0, 0);
    }
    @Override
    public int onStartCommand(final android.content.Intent intent, int flags, int startId) {
    	if (ServiceHelper.StarterHelper.onStartCommand(processBA, new Runnable() {
            public void run() {
                handleStart(intent);
            }}))
			;
		else {
			ServiceHelper.StarterHelper.addWaitForLayout (new Runnable() {
				public void run() {
                    processBA.setActivityPaused(false);
                    BA.LogInfo("** Service (starter) Create **");
                    processBA.raiseEvent(null, "service_create");
					handleStart(intent);
                    ServiceHelper.StarterHelper.removeWaitForLayout();
				}
			});
		}
        processBA.runHook("onstartcommand", this, new Object[] {intent, flags, startId});
		return android.app.Service.START_NOT_STICKY;
    }
    public void onTaskRemoved(android.content.Intent rootIntent) {
        super.onTaskRemoved(rootIntent);
        if (true)
            processBA.raiseEvent(null, "service_taskremoved");
            
    }
    private void handleStart(android.content.Intent intent) {
    	BA.LogInfo("** Service (starter) Start **");
    	java.lang.reflect.Method startEvent = processBA.htSubs.get("service_start");
    	if (startEvent != null) {
    		if (startEvent.getParameterTypes().length > 0) {
    			anywheresoftware.b4a.objects.IntentWrapper iw = ServiceHelper.StarterHelper.handleStartIntent(intent, _service, processBA);
    			processBA.raiseEvent(null, "service_start", iw);
    		}
    		else {
    			processBA.raiseEvent(null, "service_start");
    		}
    	}
    }
	
	@Override
	public void onDestroy() {
        super.onDestroy();
        if (true) {
            BA.LogInfo("** Service (starter) Destroy (ignored)**");
        }
        else {
            BA.LogInfo("** Service (starter) Destroy **");
		    processBA.raiseEvent(null, "service_destroy");
            processBA.service = null;
		    mostCurrent = null;
		    processBA.setActivityPaused(true);
            processBA.runHook("ondestroy", this, null);
        }
	}

@Override
	public android.os.IBinder onBind(android.content.Intent intent) {
		return null;
	}
public anywheresoftware.b4a.keywords.Common __c = null;
public static anywheresoftware.b4a.gps.GPS _gps = null;
public static anywheresoftware.b4a.sql.SQL _skmt = null;
public static SHARK2.keymon.com.mx.c_subs _s = null;
public static anywheresoftware.b4a.phone.Phone _ph = null;
public static anywheresoftware.b4a.objects.RuntimePermissions _rp = null;
public static uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper _flp = null;
public static SHARK2.keymon.com.mx.dbrequestmanager _reqmanager = null;
public static String _dbreqserver = "";
public static anywheresoftware.b4a.objects.Timer _timer1 = null;
public static int _interval = 0;
public static String _ruta = "";
public static anywheresoftware.b4a.keywords.StringBuilderWrapper _logs = null;
public static anywheresoftware.b4a.phone.Phone.LogCat _logcat = null;
public static String _muestraprogreso = "";
public static boolean _logger = false;
public static String _mac_impresora = "";
public static String _marcacel = "";
public static String _tabla = "";
public static float _pre_viejo = 0f;
public static anywheresoftware.b4a.objects.Serial.BluetoothAdmin _btadmin = null;
public static boolean _bluetoothstate = false;
public b4a.example.dateutils _dateutils = null;
public SHARK2.keymon.com.mx.main _main = null;
public SHARK2.keymon.com.mx.appupdater _appupdater = null;
public SHARK2.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public SHARK2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public SHARK2.keymon.com.mx.notificationservice _notificationservice = null;
public SHARK2.keymon.com.mx.pendientes _pendientes = null;
public SHARK2.keymon.com.mx.subs _subs = null;
public SHARK2.keymon.com.mx.tracker _tracker = null;
public SHARK2.keymon.com.mx.newinst2 _newinst2 = null;
public SHARK2.keymon.com.mx.b4xpages _b4xpages = null;
public SHARK2.keymon.com.mx.b4xcollections _b4xcollections = null;
public SHARK2.keymon.com.mx.httputils2service _httputils2service = null;
public SHARK2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public static String  _reinicializareqmanager(String _srv) throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "reinicializareqmanager", false))
	 {return ((String) Debug.delegate(processBA, "reinicializareqmanager", new Object[] {_srv}));}
RDebugUtils.currentLine=36569088;
 //BA.debugLineNum = 36569088;BA.debugLine="Sub reinicializaReqManager(srv As String)";
RDebugUtils.currentLine=36569089;
 //BA.debugLineNum = 36569089;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES whe";
_skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("SERVER")}));
RDebugUtils.currentLine=36569090;
 //BA.debugLineNum = 36569090;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(CAT";
_skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("SERVER"),(Object)(_srv)}));
RDebugUtils.currentLine=36569091;
 //BA.debugLineNum = 36569091;BA.debugLine="DBReqServer = srv";
_dbreqserver = _srv;
RDebugUtils.currentLine=36569092;
 //BA.debugLineNum = 36569092;BA.debugLine="reqManager.Initialize(Me, srv)";
_reqmanager._initialize /*String*/ (null,processBA,starter.getObject(),_srv);
RDebugUtils.currentLine=36569093;
 //BA.debugLineNum = 36569093;BA.debugLine="LogColor(srv, Colors.red)";
anywheresoftware.b4a.keywords.Common.LogImpl("536569093",_srv,anywheresoftware.b4a.keywords.Common.Colors.Red);
RDebugUtils.currentLine=36569094;
 //BA.debugLineNum = 36569094;BA.debugLine="End Sub";
return "";
}
public static String  _envia_ultima_gps() throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "envia_ultima_gps", false))
	 {return ((String) Debug.delegate(processBA, "envia_ultima_gps", null));}
SHARK2.keymon.com.mx.dbrequestmanager._dbcommand _cmd = null;
RDebugUtils.currentLine=36372480;
 //BA.debugLineNum = 36372480;BA.debugLine="Sub ENVIA_ULTIMA_GPS";
RDebugUtils.currentLine=36372481;
 //BA.debugLineNum = 36372481;BA.debugLine="Dim logger As Boolean = False";
_logger = anywheresoftware.b4a.keywords.Common.False;
RDebugUtils.currentLine=36372482;
 //BA.debugLineNum = 36372482;BA.debugLine="If logger Then LogColor(\"Iniciamos ENVIA_ULTIMA_G";
if (_logger) { 
anywheresoftware.b4a.keywords.Common.LogImpl("536372482","Iniciamos ENVIA_ULTIMA_GPS",anywheresoftware.b4a.keywords.Common.Colors.Magenta);};
RDebugUtils.currentLine=36372483;
 //BA.debugLineNum = 36372483;BA.debugLine="Dim cmd As DBCommand";
_cmd = new SHARK2.keymon.com.mx.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=36372487;
 //BA.debugLineNum = 36372487;BA.debugLine="Dim cmd As DBCommand";
_cmd = new SHARK2.keymon.com.mx.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=36372488;
 //BA.debugLineNum = 36372488;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
RDebugUtils.currentLine=36372489;
 //BA.debugLineNum = 36372489;BA.debugLine="cmd.Name = \"UPDATE_SHARK2_ACTUAL2_GPS\"";
_cmd.Name /*String*/  = "UPDATE_SHARK2_ACTUAL2_GPS";
RDebugUtils.currentLine=36372490;
 //BA.debugLineNum = 36372490;BA.debugLine="If B4XPages.MainPage.lat_gps.Length < 15 Then B4X";
if (mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._lat_gps /*String*/ .length()<15) { 
mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._lat_gps /*String*/  = mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._lat_gps /*String*/ +"0";};
RDebugUtils.currentLine=36372491;
 //BA.debugLineNum = 36372491;BA.debugLine="cmd.Parameters = Array As Object(B4XPages.MainPag";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._montoactual /*String*/ ),(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._clientestotal /*String*/ ),(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._clientesventa /*String*/ ),(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._clientesvisitados /*String*/ ),(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._lat_gps /*String*/ ),(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._lon_gps /*String*/ ),(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._batt /*int*/ ),(Object)(0),(Object)(0),(Object)(0),(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._almacen /*String*/ ),(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._rutapreventa /*String*/ )};
RDebugUtils.currentLine=36372492;
 //BA.debugLineNum = 36372492;BA.debugLine="If logger Then Log($\"montoActual: ${B4XPages.Main";
if (_logger) { 
anywheresoftware.b4a.keywords.Common.LogImpl("536372492",("montoActual: "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._montoactual /*String*/ ))+", cTotal: "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._clientestotal /*String*/ ))+", cVenta: "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._clientesventa /*String*/ ))+", cVisitados: "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._clientesvisitados /*String*/ ))+", "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._lat_gps /*String*/ ))+", "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._lon_gps /*String*/ ))+", Batt: "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._batt /*int*/ ))+", 0, 0, 0, Almacen: "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._almacen /*String*/ ))+", Ruta: "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (processBA)._rutapreventa /*String*/ ))+""),0);};
RDebugUtils.currentLine=36372493;
 //BA.debugLineNum = 36372493;BA.debugLine="reqManager.ExecuteCommand(cmd, \"inst_visitas\")";
_reqmanager._executecommand /*String*/ (null,_cmd,(Object)("inst_visitas"));
RDebugUtils.currentLine=36372494;
 //BA.debugLineNum = 36372494;BA.debugLine="skmt.ExecNonQuery2(\"Update cat_variables set CAT_";
_skmt.ExecNonQuery2("Update cat_variables set CAT_VA_VALOR = ?  WHERE CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{anywheresoftware.b4a.keywords.Common.DateTime.Time(anywheresoftware.b4a.keywords.Common.DateTime.getNow()),"HoraIngreso"}));
RDebugUtils.currentLine=36372496;
 //BA.debugLineNum = 36372496;BA.debugLine="Timer1.Enabled = False";
_timer1.setEnabled(anywheresoftware.b4a.keywords.Common.False);
RDebugUtils.currentLine=36372497;
 //BA.debugLineNum = 36372497;BA.debugLine="Timer1.Interval = Interval * 1000";
_timer1.setInterval((long) (_interval*1000));
RDebugUtils.currentLine=36372498;
 //BA.debugLineNum = 36372498;BA.debugLine="Timer1.Enabled = True";
_timer1.setEnabled(anywheresoftware.b4a.keywords.Common.True);
RDebugUtils.currentLine=36372499;
 //BA.debugLineNum = 36372499;BA.debugLine="End Sub";
return "";
}
public static boolean  _application_error(anywheresoftware.b4a.objects.B4AException _error,String _stacktrace) throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "application_error", false))
	 {return ((Boolean) Debug.delegate(processBA, "application_error", new Object[] {_error,_stacktrace}));}
anywheresoftware.b4j.object.JavaObject _jo = null;
long _l = 0L;
RDebugUtils.currentLine=36503552;
 //BA.debugLineNum = 36503552;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
RDebugUtils.currentLine=36503554;
 //BA.debugLineNum = 36503554;BA.debugLine="Dim jo As JavaObject";
_jo = new anywheresoftware.b4j.object.JavaObject();
RDebugUtils.currentLine=36503555;
 //BA.debugLineNum = 36503555;BA.debugLine="Dim l As Long = 500: jo.InitializeStatic(\"java.la";
_l = (long) (500);
RDebugUtils.currentLine=36503555;
 //BA.debugLineNum = 36503555;BA.debugLine="Dim l As Long = 500: jo.InitializeStatic(\"java.la";
_jo.InitializeStatic("java.lang.Thread").RunMethod("sleep",new Object[]{(Object)(_l)});
RDebugUtils.currentLine=36503556;
 //BA.debugLineNum = 36503556;BA.debugLine="logcat.LogCatStop";
_logcat.LogCatStop();
RDebugUtils.currentLine=36503557;
 //BA.debugLineNum = 36503557;BA.debugLine="logs.Append(StackTrace)";
_logs.Append(_stacktrace);
RDebugUtils.currentLine=36503558;
 //BA.debugLineNum = 36503558;BA.debugLine="Subs.revisaBD";
mostCurrent._subs._revisabd /*String*/ (processBA);
RDebugUtils.currentLine=36503559;
 //BA.debugLineNum = 36503559;BA.debugLine="Subs.errorLog.ExecNonQuery2(\"INSERT INTO errores(";
mostCurrent._subs._errorlog /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO errores(fecha, error) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(mostCurrent._subs._fechakmt /*String*/ (processBA,BA.NumberToString(anywheresoftware.b4a.keywords.Common.DateTime.getNow()))),(Object)(_logs.getObject())}));
RDebugUtils.currentLine=36503560;
 //BA.debugLineNum = 36503560;BA.debugLine="Return True";
if (true) return anywheresoftware.b4a.keywords.Common.True;
RDebugUtils.currentLine=36503561;
 //BA.debugLineNum = 36503561;BA.debugLine="End Sub";
return false;
}
public static String  _btadmin_statechanged(int _newstate,int _oldstate) throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "btadmin_statechanged", false))
	 {return ((String) Debug.delegate(processBA, "btadmin_statechanged", new Object[] {_newstate,_oldstate}));}
RDebugUtils.currentLine=35979264;
 //BA.debugLineNum = 35979264;BA.debugLine="Private Sub BTAdmin_StateChanged (NewState As Int,";
RDebugUtils.currentLine=35979265;
 //BA.debugLineNum = 35979265;BA.debugLine="If logger Then Log(\"BT state changed: \" & NewStat";
if (_logger) { 
anywheresoftware.b4a.keywords.Common.LogImpl("535979265","BT state changed: "+BA.NumberToString(_newstate),0);};
RDebugUtils.currentLine=35979266;
 //BA.debugLineNum = 35979266;BA.debugLine="BluetoothState = NewState = BTAdmin.STATE_ON";
_bluetoothstate = _newstate==_btadmin.STATE_ON;
RDebugUtils.currentLine=35979268;
 //BA.debugLineNum = 35979268;BA.debugLine="End Sub";
return "";
}
public static String  _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(processBA, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=36175872;
 //BA.debugLineNum = 36175872;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=36175874;
 //BA.debugLineNum = 36175874;BA.debugLine="End Sub";
return "";
}
public static String  _logcat_logcatdata(byte[] _buffer,int _length) throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "logcat_logcatdata", false))
	 {return ((String) Debug.delegate(processBA, "logcat_logcatdata", new Object[] {_buffer,_length}));}
RDebugUtils.currentLine=36438016;
 //BA.debugLineNum = 36438016;BA.debugLine="Private Sub logcat_LogCatData (Buffer() As Byte, L";
RDebugUtils.currentLine=36438017;
 //BA.debugLineNum = 36438017;BA.debugLine="logs.Append(BytesToString(Buffer, 0, Length, \"utf";
_logs.Append(anywheresoftware.b4a.keywords.Common.BytesToString(_buffer,(int) (0),_length,"utf8"));
RDebugUtils.currentLine=36438018;
 //BA.debugLineNum = 36438018;BA.debugLine="If logs.Length > 4000 Then";
if (_logs.getLength()>4000) { 
RDebugUtils.currentLine=36438019;
 //BA.debugLineNum = 36438019;BA.debugLine="logs.Remove(0, logs.Length - 2000) 'Obtenemos lo";
_logs.Remove((int) (0),(int) (_logs.getLength()-2000));
 };
RDebugUtils.currentLine=36438021;
 //BA.debugLineNum = 36438021;BA.debugLine="End Sub";
return "";
}
public static String  _service_create() throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "service_create", false))
	 {return ((String) Debug.delegate(processBA, "service_create", null));}
RDebugUtils.currentLine=35913728;
 //BA.debugLineNum = 35913728;BA.debugLine="Sub Service_Create";
RDebugUtils.currentLine=35913731;
 //BA.debugLineNum = 35913731;BA.debugLine="gps.Initialize(\"GPS\")";
_gps.Initialize("GPS");
RDebugUtils.currentLine=35913732;
 //BA.debugLineNum = 35913732;BA.debugLine="s.Initialize(Me, \"Subs\") 'Inicializamos la clase";
_s._initialize /*Object*/ (null,processBA,starter.getObject(),"Subs");
RDebugUtils.currentLine=35913733;
 //BA.debugLineNum = 35913733;BA.debugLine="skmt = s.inicializaBD(File.DirInternal, \"kmt.db\")";
_skmt = _s._inicializabd /*anywheresoftware.b4a.sql.SQL*/ (null,anywheresoftware.b4a.keywords.Common.File.getDirInternal(),"kmt.db");
RDebugUtils.currentLine=35913734;
 //BA.debugLineNum = 35913734;BA.debugLine="BTAdmin.Initialize(\"admin\")";
_btadmin.Initialize(processBA,"admin");
RDebugUtils.currentLine=35913736;
 //BA.debugLineNum = 35913736;BA.debugLine="Timer1.Initialize(\"Timer1\", Interval * 1000)";
_timer1.Initialize(processBA,"Timer1",(long) (_interval*1000));
RDebugUtils.currentLine=35913737;
 //BA.debugLineNum = 35913737;BA.debugLine="Timer1.Enabled = True";
_timer1.setEnabled(anywheresoftware.b4a.keywords.Common.True);
RDebugUtils.currentLine=35913742;
 //BA.debugLineNum = 35913742;BA.debugLine="logs.Initialize";
_logs.Initialize();
RDebugUtils.currentLine=35913744;
 //BA.debugLineNum = 35913744;BA.debugLine="End Sub";
return "";
}
public static String  _service_destroy() throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "service_destroy", false))
	 {return ((String) Debug.delegate(processBA, "service_destroy", null));}
RDebugUtils.currentLine=36306944;
 //BA.debugLineNum = 36306944;BA.debugLine="Sub Service_Destroy";
RDebugUtils.currentLine=36306946;
 //BA.debugLineNum = 36306946;BA.debugLine="End Sub";
return "";
}
public static String  _service_start(anywheresoftware.b4a.objects.IntentWrapper _startingintent) throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "service_start", false))
	 {return ((String) Debug.delegate(processBA, "service_start", new Object[] {_startingintent}));}
RDebugUtils.currentLine=36044800;
 //BA.debugLineNum = 36044800;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
RDebugUtils.currentLine=36044801;
 //BA.debugLineNum = 36044801;BA.debugLine="Service.StopAutomaticForeground 'Starter service";
mostCurrent._service.StopAutomaticForeground();
RDebugUtils.currentLine=36044802;
 //BA.debugLineNum = 36044802;BA.debugLine="Subs.revisaBD";
mostCurrent._subs._revisabd /*String*/ (processBA);
RDebugUtils.currentLine=36044804;
 //BA.debugLineNum = 36044804;BA.debugLine="If s.traeDBReqServerDeBD(skmt) <> \"N/A\" And s.tra";
if ((_s._traedbreqserverdebd /*String*/ (null,_skmt)).equals("N/A") == false && (_s._traedbreqserverdebd /*String*/ (null,_skmt)).equals("") == false) { 
_dbreqserver = _s._traedbreqserverdebd /*String*/ (null,_skmt);};
RDebugUtils.currentLine=36044805;
 //BA.debugLineNum = 36044805;BA.debugLine="reqManager.Initialize(Me, DBReqServer)";
_reqmanager._initialize /*String*/ (null,processBA,starter.getObject(),_dbreqserver);
RDebugUtils.currentLine=36044806;
 //BA.debugLineNum = 36044806;BA.debugLine="Log($\"Starter - |${DBReqServer}|\"$)";
anywheresoftware.b4a.keywords.Common.LogImpl("536044806",("Starter - |"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(_dbreqserver))+"|"),0);
RDebugUtils.currentLine=36044807;
 //BA.debugLineNum = 36044807;BA.debugLine="End Sub";
return "";
}
public static String  _service_taskremoved() throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "service_taskremoved", false))
	 {return ((String) Debug.delegate(processBA, "service_taskremoved", null));}
RDebugUtils.currentLine=36241408;
 //BA.debugLineNum = 36241408;BA.debugLine="Sub Service_TaskRemoved";
RDebugUtils.currentLine=36241410;
 //BA.debugLineNum = 36241410;BA.debugLine="End Sub";
return "";
}
public static String  _timer1_tick() throws Exception{
RDebugUtils.currentModule="starter";
if (Debug.shouldDelegate(processBA, "timer1_tick", false))
	 {return ((String) Debug.delegate(processBA, "timer1_tick", null));}
RDebugUtils.currentLine=36110336;
 //BA.debugLineNum = 36110336;BA.debugLine="Private Sub Timer1_Tick";
RDebugUtils.currentLine=36110338;
 //BA.debugLineNum = 36110338;BA.debugLine="ENVIA_ULTIMA_GPS";
_envia_ultima_gps();
RDebugUtils.currentLine=36110339;
 //BA.debugLineNum = 36110339;BA.debugLine="End Sub";
return "";
}
}