package SHARK2.keymon.com.mx;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class starter_subs_0 {


public static RemoteObject  _application_error(RemoteObject _error,RemoteObject _stacktrace) throws Exception{
try {
		Debug.PushSubsStack("Application_Error (starter) ","starter",29,starter.processBA,starter.mostCurrent,117);
if (RapidSub.canDelegate("application_error")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","application_error", _error, _stacktrace);}
RemoteObject _jo = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _l = RemoteObject.createImmutable(0L);
Debug.locals.put("Error", _error);
Debug.locals.put("StackTrace", _stacktrace);
 BA.debugLineNum = 117;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 119;BA.debugLine="Dim jo As JavaObject";
Debug.ShouldStop(4194304);
_jo = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");Debug.locals.put("jo", _jo);
 BA.debugLineNum = 120;BA.debugLine="Dim l As Long = 500: jo.InitializeStatic(\"java.la";
Debug.ShouldStop(8388608);
_l = BA.numberCast(long.class, 500);Debug.locals.put("l", _l);Debug.locals.put("l", _l);
 BA.debugLineNum = 120;BA.debugLine="Dim l As Long = 500: jo.InitializeStatic(\"java.la";
Debug.ShouldStop(8388608);
_jo.runMethod(false,"InitializeStatic",(Object)(RemoteObject.createImmutable("java.lang.Thread"))).runVoidMethod ("RunMethod",(Object)(BA.ObjectToString("sleep")),(Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(_l)})));
 BA.debugLineNum = 121;BA.debugLine="logcat.LogCatStop";
Debug.ShouldStop(16777216);
starter._logcat.runVoidMethod ("LogCatStop");
 BA.debugLineNum = 122;BA.debugLine="logs.Append(StackTrace)";
Debug.ShouldStop(33554432);
starter._logs.runVoidMethod ("Append",(Object)(_stacktrace));
 BA.debugLineNum = 123;BA.debugLine="Subs.revisaBD";
Debug.ShouldStop(67108864);
starter.mostCurrent._subs.runVoidMethod ("_revisabd" /*RemoteObject*/ ,starter.processBA);
 BA.debugLineNum = 124;BA.debugLine="Subs.errorLog.ExecNonQuery2(\"INSERT INTO errores(";
Debug.ShouldStop(134217728);
starter.mostCurrent._subs._errorlog /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO errores(fecha, error) VALUES (?,?)")),(Object)(starter.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(starter.mostCurrent._subs.runMethod(true,"_fechakmt" /*RemoteObject*/ ,starter.processBA,(Object)(BA.NumberToString(starter.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"))))),(starter._logs.getObject())})))));
 BA.debugLineNum = 125;BA.debugLine="Return True";
Debug.ShouldStop(268435456);
if (true) return starter.mostCurrent.__c.getField(true,"True");
 BA.debugLineNum = 126;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btadmin_statechanged(RemoteObject _newstate,RemoteObject _oldstate) throws Exception{
try {
		Debug.PushSubsStack("BTAdmin_StateChanged (starter) ","starter",29,starter.processBA,starter.mostCurrent,55);
if (RapidSub.canDelegate("btadmin_statechanged")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","btadmin_statechanged", _newstate, _oldstate);}
Debug.locals.put("NewState", _newstate);
Debug.locals.put("OldState", _oldstate);
 BA.debugLineNum = 55;BA.debugLine="Private Sub BTAdmin_StateChanged (NewState As Int,";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 56;BA.debugLine="If logger Then Log(\"BT state changed: \" & NewStat";
Debug.ShouldStop(8388608);
if (starter._logger.<Boolean>get().booleanValue()) { 
starter.mostCurrent.__c.runVoidMethod ("LogImpl","535979265",RemoteObject.concat(RemoteObject.createImmutable("BT state changed: "),_newstate),0);};
 BA.debugLineNum = 57;BA.debugLine="BluetoothState = NewState = BTAdmin.STATE_ON";
Debug.ShouldStop(16777216);
starter._bluetoothstate = BA.ObjectToBoolean(RemoteObject.solveBoolean("=",_newstate,BA.numberCast(double.class, starter._btadmin.getField(true,"STATE_ON"))));
 BA.debugLineNum = 59;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _envia_ultima_gps() throws Exception{
try {
		Debug.PushSubsStack("ENVIA_ULTIMA_GPS (starter) ","starter",29,starter.processBA,starter.mostCurrent,87);
if (RapidSub.canDelegate("envia_ultima_gps")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","envia_ultima_gps");}
RemoteObject _cmd = RemoteObject.declareNull("SHARK2.keymon.com.mx.dbrequestmanager._dbcommand");
 BA.debugLineNum = 87;BA.debugLine="Sub ENVIA_ULTIMA_GPS";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 88;BA.debugLine="Dim logger As Boolean = False";
Debug.ShouldStop(8388608);
starter._logger = starter.mostCurrent.__c.getField(true,"False");
 BA.debugLineNum = 89;BA.debugLine="If logger Then LogColor(\"Iniciamos ENVIA_ULTIMA_G";
Debug.ShouldStop(16777216);
if (starter._logger.<Boolean>get().booleanValue()) { 
starter.mostCurrent.__c.runVoidMethod ("LogImpl","536372482",BA.ObjectToString("Iniciamos ENVIA_ULTIMA_GPS"),starter.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));};
 BA.debugLineNum = 90;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(33554432);
_cmd = RemoteObject.createNew ("SHARK2.keymon.com.mx.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 BA.debugLineNum = 94;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(536870912);
_cmd = RemoteObject.createNew ("SHARK2.keymon.com.mx.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 BA.debugLineNum = 95;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(1073741824);
_cmd.runVoidMethod ("Initialize");
 BA.debugLineNum = 96;BA.debugLine="cmd.Name = \"UPDATE_SHARK2_ACTUAL2_GPS\"";
Debug.ShouldStop(-2147483648);
_cmd.setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("UPDATE_SHARK2_ACTUAL2_GPS"));
 BA.debugLineNum = 97;BA.debugLine="If B4XPages.MainPage.lat_gps.Length < 15 Then B4X";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean("<",starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_lat_gps" /*RemoteObject*/ ).runMethod(true,"length"),BA.numberCast(double.class, 15))) { 
starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).setField ("_lat_gps" /*RemoteObject*/ ,RemoteObject.concat(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_lat_gps" /*RemoteObject*/ ),RemoteObject.createImmutable("0")));};
 BA.debugLineNum = 98;BA.debugLine="cmd.Parameters = Array As Object(B4XPages.MainPag";
Debug.ShouldStop(2);
_cmd.setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {12},new Object[] {(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_montoactual" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_clientestotal" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_clientesventa" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_clientesvisitados" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_lat_gps" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_lon_gps" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_batt" /*RemoteObject*/ )),RemoteObject.createImmutable((0)),RemoteObject.createImmutable((0)),RemoteObject.createImmutable((0)),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_almacen" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_rutapreventa" /*RemoteObject*/ ))}));
 BA.debugLineNum = 99;BA.debugLine="If logger Then Log($\"montoActual: ${B4XPages.Main";
Debug.ShouldStop(4);
if (starter._logger.<Boolean>get().booleanValue()) { 
starter.mostCurrent.__c.runVoidMethod ("LogImpl","536372492",(RemoteObject.concat(RemoteObject.createImmutable("montoActual: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_montoactual" /*RemoteObject*/ )))),RemoteObject.createImmutable(", cTotal: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_clientestotal" /*RemoteObject*/ )))),RemoteObject.createImmutable(", cVenta: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_clientesventa" /*RemoteObject*/ )))),RemoteObject.createImmutable(", cVisitados: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_clientesvisitados" /*RemoteObject*/ )))),RemoteObject.createImmutable(", "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_lat_gps" /*RemoteObject*/ )))),RemoteObject.createImmutable(", "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_lon_gps" /*RemoteObject*/ )))),RemoteObject.createImmutable(", Batt: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_batt" /*RemoteObject*/ )))),RemoteObject.createImmutable(", 0, 0, 0, Almacen: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_almacen" /*RemoteObject*/ )))),RemoteObject.createImmutable(", Ruta: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_rutapreventa" /*RemoteObject*/ )))),RemoteObject.createImmutable(""))),0);};
 BA.debugLineNum = 100;BA.debugLine="reqManager.ExecuteCommand(cmd, \"inst_visitas\")";
Debug.ShouldStop(8);
starter._reqmanager.runClassMethod (SHARK2.keymon.com.mx.dbrequestmanager.class, "_executecommand" /*RemoteObject*/ ,(Object)(_cmd),(Object)((RemoteObject.createImmutable("inst_visitas"))));
 BA.debugLineNum = 101;BA.debugLine="skmt.ExecNonQuery2(\"Update cat_variables set CAT_";
Debug.ShouldStop(16);
starter._skmt.runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("Update cat_variables set CAT_VA_VALOR = ?  WHERE CAT_VA_DESCRIPCION = ?")),(Object)(starter.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {2},new Object[] {starter.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(starter.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"))),RemoteObject.createImmutable("HoraIngreso")})))));
 BA.debugLineNum = 103;BA.debugLine="Timer1.Enabled = False";
Debug.ShouldStop(64);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 104;BA.debugLine="Timer1.Interval = Interval * 1000";
Debug.ShouldStop(128);
starter._timer1.runMethod(true,"setInterval",BA.numberCast(long.class, RemoteObject.solve(new RemoteObject[] {starter._interval,RemoteObject.createImmutable(1000)}, "*",0, 1)));
 BA.debugLineNum = 105;BA.debugLine="Timer1.Enabled = True";
Debug.ShouldStop(256);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 106;BA.debugLine="End Sub";
Debug.ShouldStop(512);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _gps_locationchanged(RemoteObject _location1) throws Exception{
try {
		Debug.PushSubsStack("GPS_LocationChanged (starter) ","starter",29,starter.processBA,starter.mostCurrent,75);
if (RapidSub.canDelegate("gps_locationchanged")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","gps_locationchanged", _location1);}
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 75;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
Debug.ShouldStop(1024);
 BA.debugLineNum = 77;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _logcat_logcatdata(RemoteObject _buffer,RemoteObject _length) throws Exception{
try {
		Debug.PushSubsStack("logcat_LogCatData (starter) ","starter",29,starter.processBA,starter.mostCurrent,109);
if (RapidSub.canDelegate("logcat_logcatdata")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","logcat_logcatdata", _buffer, _length);}
Debug.locals.put("Buffer", _buffer);
Debug.locals.put("Length", _length);
 BA.debugLineNum = 109;BA.debugLine="Private Sub logcat_LogCatData (Buffer() As Byte, L";
Debug.ShouldStop(4096);
 BA.debugLineNum = 110;BA.debugLine="logs.Append(BytesToString(Buffer, 0, Length, \"utf";
Debug.ShouldStop(8192);
starter._logs.runVoidMethod ("Append",(Object)(starter.mostCurrent.__c.runMethod(true,"BytesToString",(Object)(_buffer),(Object)(BA.numberCast(int.class, 0)),(Object)(_length),(Object)(RemoteObject.createImmutable("utf8")))));
 BA.debugLineNum = 111;BA.debugLine="If logs.Length > 4000 Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean(">",starter._logs.runMethod(true,"getLength"),BA.numberCast(double.class, 4000))) { 
 BA.debugLineNum = 112;BA.debugLine="logs.Remove(0, logs.Length - 2000) 'Obtenemos lo";
Debug.ShouldStop(32768);
starter._logs.runVoidMethod ("Remove",(Object)(BA.numberCast(int.class, 0)),(Object)(RemoteObject.solve(new RemoteObject[] {starter._logs.runMethod(true,"getLength"),RemoteObject.createImmutable(2000)}, "-",1, 1)));
 };
 BA.debugLineNum = 114;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 6;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 9;BA.debugLine="Public gps As GPS";
starter._gps = RemoteObject.createNew ("anywheresoftware.b4a.gps.GPS");
 //BA.debugLineNum = 10;BA.debugLine="Dim skmt As SQL";
starter._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");
 //BA.debugLineNum = 11;BA.debugLine="Dim s As C_Subs";
starter._s = RemoteObject.createNew ("SHARK2.keymon.com.mx.c_subs");
 //BA.debugLineNum = 12;BA.debugLine="Dim ph As Phone";
starter._ph = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone");
 //BA.debugLineNum = 13;BA.debugLine="Public rp As RuntimePermissions";
starter._rp = RemoteObject.createNew ("anywheresoftware.b4a.objects.RuntimePermissions");
 //BA.debugLineNum = 14;BA.debugLine="Public FLP As FusedLocationProvider";
starter._flp = RemoteObject.createNew ("uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper");
 //BA.debugLineNum = 16;BA.debugLine="Dim reqManager As DBRequestManager";
starter._reqmanager = RemoteObject.createNew ("SHARK2.keymon.com.mx.dbrequestmanager");
 //BA.debugLineNum = 17;BA.debugLine="Dim DBReqServer As String = \"http://keymon.net:17";
starter._dbreqserver = BA.ObjectToString("http://keymon.net:1781");
 //BA.debugLineNum = 21;BA.debugLine="Dim Timer1 As Timer";
starter._timer1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");
 //BA.debugLineNum = 22;BA.debugLine="Dim Interval As Int = 10";
starter._interval = BA.numberCast(int.class, 10);
 //BA.debugLineNum = 23;BA.debugLine="Dim ruta As String = File.DirInternal";
starter._ruta = starter.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal");
 //BA.debugLineNum = 25;BA.debugLine="Private logs As StringBuilder";
starter._logs = RemoteObject.createNew ("anywheresoftware.b4a.keywords.StringBuilderWrapper");
 //BA.debugLineNum = 26;BA.debugLine="Private logcat As LogCat";
starter._logcat = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone.LogCat");
 //BA.debugLineNum = 27;BA.debugLine="Dim muestraProgreso = 0";
starter._muestraprogreso = BA.NumberToString(0);
 //BA.debugLineNum = 28;BA.debugLine="Dim logger As Boolean = False";
starter._logger = starter.mostCurrent.__c.getField(true,"False");
 //BA.debugLineNum = 29;BA.debugLine="Dim MAC_IMPRESORA As String";
starter._mac_impresora = RemoteObject.createImmutable("");
 //BA.debugLineNum = 30;BA.debugLine="Dim marcaCel As String = ph.manufacturer";
starter._marcacel = starter._ph.runMethod(true,"getManufacturer");
 //BA.debugLineNum = 31;BA.debugLine="Dim tabla As String";
starter._tabla = RemoteObject.createImmutable("");
 //BA.debugLineNum = 32;BA.debugLine="Dim pre_viejo As Float";
starter._pre_viejo = RemoteObject.createImmutable(0f);
 //BA.debugLineNum = 33;BA.debugLine="Private BTAdmin As BluetoothAdmin";
starter._btadmin = RemoteObject.createNew ("anywheresoftware.b4a.objects.Serial.BluetoothAdmin");
 //BA.debugLineNum = 34;BA.debugLine="Public BluetoothState As Boolean";
starter._bluetoothstate = RemoteObject.createImmutable(false);
 //BA.debugLineNum = 35;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _reinicializareqmanager(RemoteObject _srv) throws Exception{
try {
		Debug.PushSubsStack("reinicializaReqManager (starter) ","starter",29,starter.processBA,starter.mostCurrent,129);
if (RapidSub.canDelegate("reinicializareqmanager")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","reinicializareqmanager", _srv);}
Debug.locals.put("srv", _srv);
 BA.debugLineNum = 129;BA.debugLine="Sub reinicializaReqManager(srv As String)";
Debug.ShouldStop(1);
 BA.debugLineNum = 130;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES whe";
Debug.ShouldStop(2);
starter._skmt.runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?")),(Object)(starter.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(RemoteObject.createImmutable("SERVER"))})))));
 BA.debugLineNum = 131;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(CAT";
Debug.ShouldStop(4);
starter._skmt.runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)")),(Object)(starter.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {RemoteObject.createImmutable(("SERVER")),(_srv)})))));
 BA.debugLineNum = 132;BA.debugLine="DBReqServer = srv";
Debug.ShouldStop(8);
starter._dbreqserver = _srv;
 BA.debugLineNum = 133;BA.debugLine="reqManager.Initialize(Me, srv)";
Debug.ShouldStop(16);
starter._reqmanager.runClassMethod (SHARK2.keymon.com.mx.dbrequestmanager.class, "_initialize" /*RemoteObject*/ ,starter.processBA,(Object)(starter.getObject()),(Object)(_srv));
 BA.debugLineNum = 134;BA.debugLine="LogColor(srv, Colors.red)";
Debug.ShouldStop(32);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","536569093",_srv,starter.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 135;BA.debugLine="End Sub";
Debug.ShouldStop(64);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _service_create() throws Exception{
try {
		Debug.PushSubsStack("Service_Create (starter) ","starter",29,starter.processBA,starter.mostCurrent,37);
if (RapidSub.canDelegate("service_create")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","service_create");}
 BA.debugLineNum = 37;BA.debugLine="Sub Service_Create";
Debug.ShouldStop(16);
 BA.debugLineNum = 40;BA.debugLine="gps.Initialize(\"GPS\")";
Debug.ShouldStop(128);
starter._gps.runVoidMethod ("Initialize",(Object)(RemoteObject.createImmutable("GPS")));
 BA.debugLineNum = 41;BA.debugLine="s.Initialize(Me, \"Subs\") 'Inicializamos la clase";
Debug.ShouldStop(256);
starter._s.runClassMethod (SHARK2.keymon.com.mx.c_subs.class, "_initialize" /*RemoteObject*/ ,starter.processBA,(Object)(starter.getObject()),(Object)(RemoteObject.createImmutable("Subs")));
 BA.debugLineNum = 42;BA.debugLine="skmt = s.inicializaBD(File.DirInternal, \"kmt.db\")";
Debug.ShouldStop(512);
starter._skmt = starter._s.runClassMethod (SHARK2.keymon.com.mx.c_subs.class, "_inicializabd" /*RemoteObject*/ ,(Object)(starter.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(RemoteObject.createImmutable("kmt.db")));
 BA.debugLineNum = 43;BA.debugLine="BTAdmin.Initialize(\"admin\")";
Debug.ShouldStop(1024);
starter._btadmin.runVoidMethod ("Initialize",starter.processBA,(Object)(RemoteObject.createImmutable("admin")));
 BA.debugLineNum = 45;BA.debugLine="Timer1.Initialize(\"Timer1\", Interval * 1000)";
Debug.ShouldStop(4096);
starter._timer1.runVoidMethod ("Initialize",starter.processBA,(Object)(BA.ObjectToString("Timer1")),(Object)(BA.numberCast(long.class, RemoteObject.solve(new RemoteObject[] {starter._interval,RemoteObject.createImmutable(1000)}, "*",0, 1))));
 BA.debugLineNum = 46;BA.debugLine="Timer1.Enabled = True";
Debug.ShouldStop(8192);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 51;BA.debugLine="logs.Initialize";
Debug.ShouldStop(262144);
starter._logs.runVoidMethod ("Initialize");
 BA.debugLineNum = 53;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _service_destroy() throws Exception{
try {
		Debug.PushSubsStack("Service_Destroy (starter) ","starter",29,starter.processBA,starter.mostCurrent,83);
if (RapidSub.canDelegate("service_destroy")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","service_destroy");}
 BA.debugLineNum = 83;BA.debugLine="Sub Service_Destroy";
Debug.ShouldStop(262144);
 BA.debugLineNum = 85;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _service_start(RemoteObject _startingintent) throws Exception{
try {
		Debug.PushSubsStack("Service_Start (starter) ","starter",29,starter.processBA,starter.mostCurrent,61);
if (RapidSub.canDelegate("service_start")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","service_start", _startingintent);}
Debug.locals.put("StartingIntent", _startingintent);
 BA.debugLineNum = 61;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 62;BA.debugLine="Service.StopAutomaticForeground 'Starter service";
Debug.ShouldStop(536870912);
starter.mostCurrent._service.runVoidMethod ("StopAutomaticForeground");
 BA.debugLineNum = 63;BA.debugLine="Subs.revisaBD";
Debug.ShouldStop(1073741824);
starter.mostCurrent._subs.runVoidMethod ("_revisabd" /*RemoteObject*/ ,starter.processBA);
 BA.debugLineNum = 65;BA.debugLine="If s.traeDBReqServerDeBD(skmt) <> \"N/A\" And s.tra";
Debug.ShouldStop(1);
if (RemoteObject.solveBoolean("!",starter._s.runClassMethod (SHARK2.keymon.com.mx.c_subs.class, "_traedbreqserverdebd" /*RemoteObject*/ ,(Object)(starter._skmt)),BA.ObjectToString("N/A")) && RemoteObject.solveBoolean("!",starter._s.runClassMethod (SHARK2.keymon.com.mx.c_subs.class, "_traedbreqserverdebd" /*RemoteObject*/ ,(Object)(starter._skmt)),BA.ObjectToString(""))) { 
starter._dbreqserver = starter._s.runClassMethod (SHARK2.keymon.com.mx.c_subs.class, "_traedbreqserverdebd" /*RemoteObject*/ ,(Object)(starter._skmt));};
 BA.debugLineNum = 66;BA.debugLine="reqManager.Initialize(Me, DBReqServer)";
Debug.ShouldStop(2);
starter._reqmanager.runClassMethod (SHARK2.keymon.com.mx.dbrequestmanager.class, "_initialize" /*RemoteObject*/ ,starter.processBA,(Object)(starter.getObject()),(Object)(starter._dbreqserver));
 BA.debugLineNum = 67;BA.debugLine="Log($\"Starter - |${DBReqServer}|\"$)";
Debug.ShouldStop(4);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","536044806",(RemoteObject.concat(RemoteObject.createImmutable("Starter - |"),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter._dbreqserver))),RemoteObject.createImmutable("|"))),0);
 BA.debugLineNum = 68;BA.debugLine="End Sub";
Debug.ShouldStop(8);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _service_taskremoved() throws Exception{
try {
		Debug.PushSubsStack("Service_TaskRemoved (starter) ","starter",29,starter.processBA,starter.mostCurrent,79);
if (RapidSub.canDelegate("service_taskremoved")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","service_taskremoved");}
 BA.debugLineNum = 79;BA.debugLine="Sub Service_TaskRemoved";
Debug.ShouldStop(16384);
 BA.debugLineNum = 81;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _timer1_tick() throws Exception{
try {
		Debug.PushSubsStack("Timer1_Tick (starter) ","starter",29,starter.processBA,starter.mostCurrent,70);
if (RapidSub.canDelegate("timer1_tick")) { return SHARK2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","timer1_tick");}
 BA.debugLineNum = 70;BA.debugLine="Private Sub Timer1_Tick";
Debug.ShouldStop(32);
 BA.debugLineNum = 72;BA.debugLine="ENVIA_ULTIMA_GPS";
Debug.ShouldStop(128);
_envia_ultima_gps();
 BA.debugLineNum = 73;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}