package reparto_izca.keymon.lat;

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,81);
if (RapidSub.canDelegate("application_error")) { return reparto_izca.keymon.lat.starter.remoteMe.runUserSub(false, "starter","application_error", _error, _stacktrace);}
Debug.locals.put("Error", _error);
Debug.locals.put("StackTrace", _stacktrace);
 BA.debugLineNum = 81;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
Debug.ShouldStop(65536);
 BA.debugLineNum = 82;BA.debugLine="Return True";
Debug.ShouldStop(131072);
if (true) return starter.mostCurrent.__c.getField(true,"True");
 BA.debugLineNum = 83;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
return RemoteObject.createImmutable(false);
}
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,95);
if (RapidSub.canDelegate("envia_ultima_gps")) { return reparto_izca.keymon.lat.starter.remoteMe.runUserSub(false, "starter","envia_ultima_gps");}
RemoteObject _cmd = RemoteObject.declareNull("reparto_izca.keymon.lat.dbrequestmanager._dbcommand");
 BA.debugLineNum = 95;BA.debugLine="Sub ENVIA_ULTIMA_GPS";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 96;BA.debugLine="If IsConnectedToInternet Then";
Debug.ShouldStop(-2147483648);
if (_isconnectedtointernet().<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 97;BA.debugLine="Log(\"Con internet, enviamos UTR!\")";
Debug.ShouldStop(1);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","872810498",RemoteObject.createImmutable("Con internet, enviamos UTR!"),0);
 BA.debugLineNum = 98;BA.debugLine="Dim skmt As SQL";
Debug.ShouldStop(2);
starter._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");
 BA.debugLineNum = 99;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(4);
_cmd = RemoteObject.createNew ("reparto_izca.keymon.lat.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 BA.debugLineNum = 100;BA.debugLine="Dim reqManager As DBRequestManager";
Debug.ShouldStop(8);
starter._reqmanager = RemoteObject.createNew ("reparto_izca.keymon.lat.dbrequestmanager");
 BA.debugLineNum = 101;BA.debugLine="reqManager.Initialize(Me, server)";
Debug.ShouldStop(16);
starter._reqmanager.runClassMethod (reparto_izca.keymon.lat.dbrequestmanager.class, "_initialize" /*RemoteObject*/ ,starter.processBA,(Object)(starter.getObject()),(Object)(starter._server));
 BA.debugLineNum = 103;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
Debug.ShouldStop(64);
starter._skmt.runVoidMethod ("Initialize",(Object)(starter._ruta),(Object)(BA.ObjectToString("kmt.db")),(Object)(starter.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 105;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
Debug.ShouldStop(256);
starter._skmt.runVoidMethod ("Initialize",(Object)(starter._ruta),(Object)(BA.ObjectToString("kmt.db")),(Object)(starter.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 113;BA.debugLine="If B4XPages.MainPage.logger Then LogColor(\"Inici";
Debug.ShouldStop(65536);
if (starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_logger" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
starter.mostCurrent.__c.runVoidMethod ("LogImpl","872810514",BA.ObjectToString("Iniciamos ENVIA_ULTIMA_GPS"),starter.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));};
 BA.debugLineNum = 114;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
Debug.ShouldStop(131072);
starter.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HHmmss"));
 BA.debugLineNum = 115;BA.debugLine="B4XPages.MainPage.ultimaActualizacionGPS = DateT";
Debug.ShouldStop(262144);
starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).setField ("_ultimaactualizaciongps" /*RemoteObject*/ ,starter.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(starter.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"))));
 BA.debugLineNum = 116;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(524288);
_cmd.runVoidMethod ("Initialize");
 BA.debugLineNum = 117;BA.debugLine="cmd.Name = \"select_fechat\"";
Debug.ShouldStop(1048576);
_cmd.setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("select_fechat"));
 BA.debugLineNum = 118;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"fechat\")";
Debug.ShouldStop(2097152);
starter._reqmanager.runClassMethod (reparto_izca.keymon.lat.dbrequestmanager.class, "_executequery" /*RemoteObject*/ ,(Object)(_cmd),(Object)(BA.numberCast(int.class, 0)),(Object)((RemoteObject.createImmutable("fechat"))));
 BA.debugLineNum = 120;BA.debugLine="Log(B4XPages.MainPage.montoActual&\"  ,  \" &B4XPa";
Debug.ShouldStop(8388608);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","872810521",RemoteObject.concat(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_montoactual" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_clientestotal" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_visitadostotales" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_monto_entregadoactual" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_entregas" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_porvisitar" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_rechazos" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_lat_gps" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_lon_gps" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_batt" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent.__c.getField(false,"Application").runMethod(true,"getVersionName"),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_almacen" /*RemoteObject*/ ),RemoteObject.createImmutable("  ,  "),starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_rutapreventa" /*RemoteObject*/ )),0);
 BA.debugLineNum = 121;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(16777216);
_cmd = RemoteObject.createNew ("reparto_izca.keymon.lat.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 BA.debugLineNum = 122;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(33554432);
_cmd.runVoidMethod ("Initialize");
 BA.debugLineNum = 123;BA.debugLine="cmd.Name = \"UPDATE_IZCA_ACTUALR2_GPS\"";
Debug.ShouldStop(67108864);
_cmd.setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("UPDATE_IZCA_ACTUALR2_GPS"));
 BA.debugLineNum = 125;BA.debugLine="cmd.Parameters = Array As Object(B4XPages.MainPa";
Debug.ShouldStop(268435456);
_cmd.setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {13},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,"_visitadostotales" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_monto_entregadoactual" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_entregas" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_porvisitar" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_rechazos" /*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*/ )),(starter.mostCurrent.__c.getField(false,"Application").runMethod(true,"getVersionName")),(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 = 126;BA.debugLine="If B4XPages.MainPage.logger Then Log($\"montoActu";
Debug.ShouldStop(536870912);
if (starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_logger" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
starter.mostCurrent.__c.runVoidMethod ("LogImpl","872810527",(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(", montoRechazado: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_montorechazado" /*RemoteObject*/ )))),RemoteObject.createImmutable(", montoEntregado: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_montoentregado" /*RemoteObject*/ )))),RemoteObject.createImmutable(", porVisitar: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_porvisitar" /*RemoteObject*/ )))),RemoteObject.createImmutable(", entregas: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_entregas" /*RemoteObject*/ )))),RemoteObject.createImmutable(", rechazos: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_rechazos" /*RemoteObject*/ )))),RemoteObject.createImmutable(", 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 = 128;BA.debugLine="reqManager.ExecuteCommand(cmd, \"inst_visitas\")";
Debug.ShouldStop(-2147483648);
starter._reqmanager.runClassMethod (reparto_izca.keymon.lat.dbrequestmanager.class, "_executecommand" /*RemoteObject*/ ,(Object)(_cmd),(Object)((RemoteObject.createImmutable("inst_visitas"))));
 BA.debugLineNum = 129;BA.debugLine="skmt.ExecNonQuery2(\"Update cat_variables set CAT";
Debug.ShouldStop(1);
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 = 132;BA.debugLine="Timer1.Enabled = False";
Debug.ShouldStop(8);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 133;BA.debugLine="Timer1.Interval = Interval * 1000";
Debug.ShouldStop(16);
starter._timer1.runMethod(true,"setInterval",BA.numberCast(long.class, RemoteObject.solve(new RemoteObject[] {starter._interval,RemoteObject.createImmutable(1000)}, "*",0, 1)));
 BA.debugLineNum = 134;BA.debugLine="Timer1.Enabled = True";
Debug.ShouldStop(32);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"True"));
 }else {
 BA.debugLineNum = 136;BA.debugLine="Log(\"Sin conexión a internet, no se envió UTR!\")";
Debug.ShouldStop(128);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","872810537",RemoteObject.createImmutable("Sin conexión a internet, no se envió UTR!"),0);
 };
 BA.debugLineNum = 138;BA.debugLine="End Sub";
Debug.ShouldStop(512);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _isconnectedtointernet() throws Exception{
try {
		Debug.PushSubsStack("IsConnectedToInternet (starter) ","starter",29,starter.processBA,starter.mostCurrent,145);
if (RapidSub.canDelegate("isconnectedtointernet")) { return reparto_izca.keymon.lat.starter.remoteMe.runUserSub(false, "starter","isconnectedtointernet");}
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.agraham.reflection.Reflection");
 BA.debugLineNum = 145;BA.debugLine="Sub IsConnectedToInternet As Boolean 'ignore";
Debug.ShouldStop(65536);
 BA.debugLineNum = 146;BA.debugLine="Dim r As Reflector";
Debug.ShouldStop(131072);
_r = RemoteObject.createNew ("anywheresoftware.b4a.agraham.reflection.Reflection");Debug.locals.put("r", _r);
 BA.debugLineNum = 147;BA.debugLine="r.Target = r.GetContext";
Debug.ShouldStop(262144);
_r.setField ("Target",(_r.runMethod(false,"GetContext",starter.processBA)));
 BA.debugLineNum = 148;BA.debugLine="r.Target = r.RunMethod2(\"getSystemService\", \"conn";
Debug.ShouldStop(524288);
_r.setField ("Target",_r.runMethod(false,"RunMethod2",(Object)(BA.ObjectToString("getSystemService")),(Object)(BA.ObjectToString("connectivity")),(Object)(RemoteObject.createImmutable("java.lang.String"))));
 BA.debugLineNum = 149;BA.debugLine="r.Target = r.RunMethod(\"getActiveNetworkInfo\")";
Debug.ShouldStop(1048576);
_r.setField ("Target",_r.runMethod(false,"RunMethod",(Object)(RemoteObject.createImmutable("getActiveNetworkInfo"))));
 BA.debugLineNum = 150;BA.debugLine="If r.Target <> Null Then";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean("N",_r.getField(false,"Target"))) { 
 BA.debugLineNum = 151;BA.debugLine="Return r.RunMethod(\"isConnectedOrConnecting\")";
Debug.ShouldStop(4194304);
if (true) return BA.ObjectToBoolean(_r.runMethod(false,"RunMethod",(Object)(RemoteObject.createImmutable("isConnectedOrConnecting"))));
 };
 BA.debugLineNum = 153;BA.debugLine="Return False";
Debug.ShouldStop(16777216);
if (true) return starter.mostCurrent.__c.getField(true,"False");
 BA.debugLineNum = 154;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _jobdone(RemoteObject _job) throws Exception{
try {
		Debug.PushSubsStack("JobDone (starter) ","starter",29,starter.processBA,starter.mostCurrent,156);
if (RapidSub.canDelegate("jobdone")) { return reparto_izca.keymon.lat.starter.remoteMe.runUserSub(false, "starter","jobdone", _job);}
Debug.locals.put("Job", _job);
 BA.debugLineNum = 156;BA.debugLine="Sub JobDone(Job As HttpJob)";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 160;BA.debugLine="If Job.Success = False Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_success" /*RemoteObject*/ ),starter.mostCurrent.__c.getField(true,"False"))) { 
 BA.debugLineNum = 162;BA.debugLine="If Job.ErrorMessage.Contains(\"failed to connect\"";
Debug.ShouldStop(2);
if (RemoteObject.solveBoolean(".",_job.getField(true,"_errormessage" /*RemoteObject*/ ).runMethod(true,"contains",(Object)(RemoteObject.createImmutable("failed to connect")))) || RemoteObject.solveBoolean(".",_job.getField(true,"_errormessage" /*RemoteObject*/ ).runMethod(true,"contains",(Object)(RemoteObject.createImmutable("Failed to connect"))))) { 
 BA.debugLineNum = 163;BA.debugLine="ToastMessageShow(\"!Hubo un error contactando al";
Debug.ShouldStop(4);
starter.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("!Hubo un error contactando al servidor, por favor revise su conexión!")),(Object)(starter.mostCurrent.__c.getField(true,"True")));
 };
 }else {
 };
 BA.debugLineNum = 169;BA.debugLine="End Sub";
Debug.ShouldStop(256);
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 rp As RuntimePermissions";
starter._rp = RemoteObject.createNew ("anywheresoftware.b4a.objects.RuntimePermissions");
 //BA.debugLineNum = 10;BA.debugLine="Public FLP As FusedLocationProvider";
starter._flp = RemoteObject.createNew ("uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper");
 //BA.debugLineNum = 11;BA.debugLine="Private flpStarted As Boolean";
starter._flpstarted = RemoteObject.createImmutable(false);
 //BA.debugLineNum = 12;BA.debugLine="Dim skmt As SQL";
starter._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");
 //BA.debugLineNum = 13;BA.debugLine="Dim ruta As String";
starter._ruta = RemoteObject.createImmutable("");
 //BA.debugLineNum = 14;BA.debugLine="Private BTAdmin As BluetoothAdmin";
starter._btadmin = RemoteObject.createNew ("anywheresoftware.b4a.objects.Serial.BluetoothAdmin");
 //BA.debugLineNum = 15;BA.debugLine="Public BluetoothState As Boolean";
starter._bluetoothstate = RemoteObject.createImmutable(false);
 //BA.debugLineNum = 16;BA.debugLine="Dim Timer1 As Timer";
starter._timer1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");
 //BA.debugLineNum = 17;BA.debugLine="Dim Interval As Int = 300";
starter._interval = BA.numberCast(int.class, 300);
 //BA.debugLineNum = 21;BA.debugLine="Dim trackerActividad  As String = \"501231235959\"";
starter._trackeractividad = BA.ObjectToString("501231235959");
 //BA.debugLineNum = 22;BA.debugLine="Dim pushServiceActividad As String = \"50123123595";
starter._pushserviceactividad = BA.ObjectToString("501231235959");
 //BA.debugLineNum = 24;BA.debugLine="Dim MAC_IMPRESORA As String";
starter._mac_impresora = RemoteObject.createImmutable("");
 //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="Public SharedFolder As String 'Para actualizar ap";
starter._sharedfolder = RemoteObject.createImmutable("");
 //BA.debugLineNum = 28;BA.debugLine="Dim cedisLocation As Location";
starter._cedislocation = RemoteObject.createNew ("anywheresoftware.b4a.gps.LocationWrapper");
 //BA.debugLineNum = 29;BA.debugLine="Dim reqManager As DBRequestManager";
starter._reqmanager = RemoteObject.createNew ("reparto_izca.keymon.lat.dbrequestmanager");
 //BA.debugLineNum = 30;BA.debugLine="Dim server As String = \"http://keymon.net:1781\"";
starter._server = BA.ObjectToString("http://keymon.net:1781");
 //BA.debugLineNum = 34;BA.debugLine="Dim muestraProgreso = 0";
starter._muestraprogreso = BA.NumberToString(0);
 //BA.debugLineNum = 35;BA.debugLine="Dim c As Cursor";
starter._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
 //BA.debugLineNum = 36;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _service_create() throws Exception{
try {
		Debug.PushSubsStack("Service_Create (starter) ","starter",29,starter.processBA,starter.mostCurrent,38);
if (RapidSub.canDelegate("service_create")) { return reparto_izca.keymon.lat.starter.remoteMe.runUserSub(false, "starter","service_create");}
 BA.debugLineNum = 38;BA.debugLine="Sub Service_Create";
Debug.ShouldStop(32);
 BA.debugLineNum = 41;BA.debugLine="ruta = File.DirInternal 'Ruta de la base de datos";
Debug.ShouldStop(256);
starter._ruta = starter.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal");
 BA.debugLineNum = 43;BA.debugLine="If Not(File.Exists(ruta, \"kmt.db\")) Then File.Cop";
Debug.ShouldStop(1024);
if (starter.mostCurrent.__c.runMethod(true,"Not",(Object)(starter.mostCurrent.__c.getField(false,"File").runMethod(true,"Exists",(Object)(starter._ruta),(Object)(RemoteObject.createImmutable("kmt.db"))))).<Boolean>get().booleanValue()) { 
starter.mostCurrent.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(starter.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirAssets")),(Object)(BA.ObjectToString("kmt.db")),(Object)(starter._ruta),(Object)(RemoteObject.createImmutable("kmt.db")));};
 BA.debugLineNum = 44;BA.debugLine="Log(ruta)";
Debug.ShouldStop(2048);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","872417286",starter._ruta,0);
 BA.debugLineNum = 45;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
Debug.ShouldStop(4096);
starter._skmt.runVoidMethod ("Initialize",(Object)(starter._ruta),(Object)(BA.ObjectToString("kmt.db")),(Object)(starter.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 59;BA.debugLine="Timer1.Initialize(\"Timer1\", Interval * 1000)";
Debug.ShouldStop(67108864);
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 = 60;BA.debugLine="Timer1.Enabled = True";
Debug.ShouldStop(134217728);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 61;BA.debugLine="SharedFolder = rp.GetSafeDirDefaultExternal(\"\")";
Debug.ShouldStop(268435456);
starter._sharedfolder = starter._rp.runMethod(true,"GetSafeDirDefaultExternal",(Object)(RemoteObject.createImmutable("")));
 BA.debugLineNum = 62;BA.debugLine="cedisLocation.Initialize";
Debug.ShouldStop(536870912);
starter._cedislocation.runVoidMethod ("Initialize");
 BA.debugLineNum = 65;BA.debugLine="cedisLocation.Latitude = \"0\"";
Debug.ShouldStop(1);
starter._cedislocation.runMethod(true,"setLatitude",BA.numberCast(double.class, "0"));
 BA.debugLineNum = 66;BA.debugLine="cedisLocation.Longitude = \"0\"";
Debug.ShouldStop(2);
starter._cedislocation.runMethod(true,"setLongitude",BA.numberCast(double.class, "0"));
 BA.debugLineNum = 67;BA.debugLine="End Sub";
Debug.ShouldStop(4);
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,85);
if (RapidSub.canDelegate("service_destroy")) { return reparto_izca.keymon.lat.starter.remoteMe.runUserSub(false, "starter","service_destroy");}
 BA.debugLineNum = 85;BA.debugLine="Sub Service_Destroy";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 87;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
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,69);
if (RapidSub.canDelegate("service_start")) { return reparto_izca.keymon.lat.starter.remoteMe.runUserSub(false, "starter","service_start", _startingintent);}
Debug.locals.put("StartingIntent", _startingintent);
 BA.debugLineNum = 69;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
Debug.ShouldStop(16);
 BA.debugLineNum = 70;BA.debugLine="Service.StopAutomaticForeground 'Starter service";
Debug.ShouldStop(32);
starter.mostCurrent._service.runVoidMethod ("StopAutomaticForeground");
 BA.debugLineNum = 74;BA.debugLine="End Sub";
Debug.ShouldStop(512);
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,76);
if (RapidSub.canDelegate("service_taskremoved")) { return reparto_izca.keymon.lat.starter.remoteMe.runUserSub(false, "starter","service_taskremoved");}
 BA.debugLineNum = 76;BA.debugLine="Sub Service_TaskRemoved";
Debug.ShouldStop(2048);
 BA.debugLineNum = 78;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
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,89);
if (RapidSub.canDelegate("timer1_tick")) { return reparto_izca.keymon.lat.starter.remoteMe.runUserSub(false, "starter","timer1_tick");}
 BA.debugLineNum = 89;BA.debugLine="Private Sub Timer1_Tick";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 92;BA.debugLine="ENVIA_ULTIMA_GPS";
Debug.ShouldStop(134217728);
_envia_ultima_gps();
 BA.debugLineNum = 93;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}