package reparto_mazapa.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",7,starter.processBA,starter.mostCurrent,83);
if (RapidSub.canDelegate("application_error")) { return reparto_mazapa.keymon.lat.starter.remoteMe.runUserSub(false, "starter","application_error", _error, _stacktrace);}
Debug.locals.put("Error", _error);
Debug.locals.put("StackTrace", _stacktrace);
 BA.debugLineNum = 83;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
Debug.ShouldStop(262144);
 BA.debugLineNum = 84;BA.debugLine="Return True";
Debug.ShouldStop(524288);
if (true) return starter.mostCurrent.__c.getField(true,"True");
 BA.debugLineNum = 85;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
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",7,starter.processBA,starter.mostCurrent,97);
if (RapidSub.canDelegate("envia_ultima_gps")) { return reparto_mazapa.keymon.lat.starter.remoteMe.runUserSub(false, "starter","envia_ultima_gps");}
RemoteObject _cmd = RemoteObject.declareNull("reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand");
 BA.debugLineNum = 97;BA.debugLine="Sub ENVIA_ULTIMA_GPS";
Debug.ShouldStop(1);
 BA.debugLineNum = 98;BA.debugLine="Dim reqManager As DBRequestManager";
Debug.ShouldStop(2);
starter._reqmanager = RemoteObject.createNew ("reparto_mazapa.keymon.lat.dbrequestmanager");
 BA.debugLineNum = 99;BA.debugLine="reqManager.Initialize(Me, server)";
Debug.ShouldStop(4);
starter._reqmanager.runClassMethod (reparto_mazapa.keymon.lat.dbrequestmanager.class, "_initialize" /*RemoteObject*/ ,starter.processBA,(Object)(starter.getObject()),(Object)(starter._server));
 BA.debugLineNum = 100;BA.debugLine="If IsConnectedToInternet Then";
Debug.ShouldStop(8);
if (_isconnectedtointernet().<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 101;BA.debugLine="Log(\"Con internet, enviamos UTR!\")";
Debug.ShouldStop(16);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","310158084",RemoteObject.createImmutable("Con internet, enviamos UTR!"),0);
 BA.debugLineNum = 102;BA.debugLine="Dim skmt As SQL";
Debug.ShouldStop(32);
starter._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");
 BA.debugLineNum = 103;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(64);
_cmd = RemoteObject.createNew ("reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 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 = 107;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
Debug.ShouldStop(1024);
starter._skmt.runVoidMethod ("Initialize",(Object)(starter._ruta),(Object)(BA.ObjectToString("kmt.db")),(Object)(starter.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 108;BA.debugLine="If B4XPages.MainPage.logger Then LogColor(\"Inici";
Debug.ShouldStop(2048);
if (starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_logger" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
starter.mostCurrent.__c.runVoidMethod ("LogImpl","310158091",BA.ObjectToString("Iniciamos ENVIA_ULTIMA_GPS"),starter.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));};
 BA.debugLineNum = 109;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
Debug.ShouldStop(4096);
starter.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setTimeFormat",BA.ObjectToString("HHmmss"));
 BA.debugLineNum = 110;BA.debugLine="B4XPages.MainPage.ultimaActualizacionGPS = DateT";
Debug.ShouldStop(8192);
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 = 111;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(16384);
_cmd.runVoidMethod ("Initialize");
 BA.debugLineNum = 112;BA.debugLine="cmd.Name = \"select_fechat\"";
Debug.ShouldStop(32768);
_cmd.setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("select_fechat"));
 BA.debugLineNum = 113;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"fechat\")";
Debug.ShouldStop(65536);
starter._reqmanager.runClassMethod (reparto_mazapa.keymon.lat.dbrequestmanager.class, "_executequery" /*RemoteObject*/ ,(Object)(_cmd),(Object)(BA.numberCast(int.class, 0)),(Object)((RemoteObject.createImmutable("fechat"))));
 BA.debugLineNum = 115;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(262144);
_cmd = RemoteObject.createNew ("reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 BA.debugLineNum = 116;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(524288);
_cmd.runVoidMethod ("Initialize");
 BA.debugLineNum = 117;BA.debugLine="cmd.Name = \"UPDATE_MAZAPA_ACTUALR3_GPS\"";
Debug.ShouldStop(1048576);
_cmd.setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("UPDATE_MAZAPA_ACTUALR3_GPS"));
 BA.debugLineNum = 118;BA.debugLine="cmd.Parameters = Array As Object(B4XPages.MainPa";
Debug.ShouldStop(2097152);
_cmd.setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {16},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*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_montorechazado" /*RemoteObject*/ )),(starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_montoentregado" /*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,"_porvisitar" /*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,"_rechazos" /*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 = 119;BA.debugLine="If B4XPages.MainPage.logger Then Log($\"montoActu";
Debug.ShouldStop(4194304);
if (starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_logger" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
starter.mostCurrent.__c.runVoidMethod ("LogImpl","310158102",(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 = 121;BA.debugLine="reqManager.ExecuteCommand(cmd, \"inst_visitas\")";
Debug.ShouldStop(16777216);
starter._reqmanager.runClassMethod (reparto_mazapa.keymon.lat.dbrequestmanager.class, "_executecommand" /*RemoteObject*/ ,(Object)(_cmd),(Object)((RemoteObject.createImmutable("inst_visitas"))));
 BA.debugLineNum = 122;BA.debugLine="skmt.ExecNonQuery2(\"Update cat_variables set CAT";
Debug.ShouldStop(33554432);
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 = 125;BA.debugLine="Timer1.Enabled = False";
Debug.ShouldStop(268435456);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 126;BA.debugLine="Timer1.Interval = Interval * 1000";
Debug.ShouldStop(536870912);
starter._timer1.runMethod(true,"setInterval",BA.numberCast(long.class, RemoteObject.solve(new RemoteObject[] {starter._interval,RemoteObject.createImmutable(1000)}, "*",0, 1)));
 BA.debugLineNum = 127;BA.debugLine="Timer1.Enabled = True";
Debug.ShouldStop(1073741824);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"True"));
 }else {
 BA.debugLineNum = 129;BA.debugLine="Log(\"Sin conexión a internet, no se envió UTR!\")";
Debug.ShouldStop(1);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","310158112",RemoteObject.createImmutable("Sin conexión a internet, no se envió UTR!"),0);
 };
 BA.debugLineNum = 131;BA.debugLine="End Sub";
Debug.ShouldStop(4);
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",7,starter.processBA,starter.mostCurrent,138);
if (RapidSub.canDelegate("isconnectedtointernet")) { return reparto_mazapa.keymon.lat.starter.remoteMe.runUserSub(false, "starter","isconnectedtointernet");}
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.agraham.reflection.Reflection");
 BA.debugLineNum = 138;BA.debugLine="Sub IsConnectedToInternet As Boolean 'ignore";
Debug.ShouldStop(512);
 BA.debugLineNum = 139;BA.debugLine="Dim r As Reflector";
Debug.ShouldStop(1024);
_r = RemoteObject.createNew ("anywheresoftware.b4a.agraham.reflection.Reflection");Debug.locals.put("r", _r);
 BA.debugLineNum = 140;BA.debugLine="r.Target = r.GetContext";
Debug.ShouldStop(2048);
_r.setField ("Target",(_r.runMethod(false,"GetContext",starter.processBA)));
 BA.debugLineNum = 141;BA.debugLine="r.Target = r.RunMethod2(\"getSystemService\", \"conn";
Debug.ShouldStop(4096);
_r.setField ("Target",_r.runMethod(false,"RunMethod2",(Object)(BA.ObjectToString("getSystemService")),(Object)(BA.ObjectToString("connectivity")),(Object)(RemoteObject.createImmutable("java.lang.String"))));
 BA.debugLineNum = 142;BA.debugLine="r.Target = r.RunMethod(\"getActiveNetworkInfo\")";
Debug.ShouldStop(8192);
_r.setField ("Target",_r.runMethod(false,"RunMethod",(Object)(RemoteObject.createImmutable("getActiveNetworkInfo"))));
 BA.debugLineNum = 143;BA.debugLine="If r.Target <> Null Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean("N",_r.getField(false,"Target"))) { 
 BA.debugLineNum = 144;BA.debugLine="Return r.RunMethod(\"isConnectedOrConnecting\")";
Debug.ShouldStop(32768);
if (true) return BA.ObjectToBoolean(_r.runMethod(false,"RunMethod",(Object)(RemoteObject.createImmutable("isConnectedOrConnecting"))));
 };
 BA.debugLineNum = 146;BA.debugLine="Return False";
Debug.ShouldStop(131072);
if (true) return starter.mostCurrent.__c.getField(true,"False");
 BA.debugLineNum = 147;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
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",7,starter.processBA,starter.mostCurrent,149);
if (RapidSub.canDelegate("jobdone")) { return reparto_mazapa.keymon.lat.starter.remoteMe.runUserSub(false, "starter","jobdone", _job);}
Debug.locals.put("Job", _job);
 BA.debugLineNum = 149;BA.debugLine="Sub JobDone(Job As HttpJob)";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 153;BA.debugLine="If Job.Success = False Then";
Debug.ShouldStop(16777216);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_success" /*RemoteObject*/ ),starter.mostCurrent.__c.getField(true,"False"))) { 
 BA.debugLineNum = 155;BA.debugLine="If Job.ErrorMessage.Contains(\"failed to connect\"";
Debug.ShouldStop(67108864);
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 = 156;BA.debugLine="ToastMessageShow(\"!Hubo un error contactando al";
Debug.ShouldStop(134217728);
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 = 162;BA.debugLine="End Sub";
Debug.ShouldStop(2);
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="Public distanciaGeo As String = 0";
starter._distanciageo = BA.NumberToString(0);
 //BA.debugLineNum = 11;BA.debugLine="Public rp As RuntimePermissions";
starter._rp = RemoteObject.createNew ("anywheresoftware.b4a.objects.RuntimePermissions");
 //BA.debugLineNum = 12;BA.debugLine="Public FLP As FusedLocationProvider";
starter._flp = RemoteObject.createNew ("uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper");
 //BA.debugLineNum = 13;BA.debugLine="Private flpStarted As Boolean";
starter._flpstarted = RemoteObject.createImmutable(false);
 //BA.debugLineNum = 14;BA.debugLine="Dim skmt As SQL";
starter._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");
 //BA.debugLineNum = 15;BA.debugLine="Dim ruta As String";
starter._ruta = RemoteObject.createImmutable("");
 //BA.debugLineNum = 16;BA.debugLine="Private BTAdmin As BluetoothAdmin";
starter._btadmin = RemoteObject.createNew ("anywheresoftware.b4a.objects.Serial.BluetoothAdmin");
 //BA.debugLineNum = 17;BA.debugLine="Public BluetoothState As Boolean";
starter._bluetoothstate = RemoteObject.createImmutable(false);
 //BA.debugLineNum = 18;BA.debugLine="Dim Timer1 As Timer";
starter._timer1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");
 //BA.debugLineNum = 19;BA.debugLine="Dim Interval As Int = 300";
starter._interval = BA.numberCast(int.class, 300);
 //BA.debugLineNum = 23;BA.debugLine="Dim trackerActividad  As String = \"501231235959\"";
starter._trackeractividad = BA.ObjectToString("501231235959");
 //BA.debugLineNum = 24;BA.debugLine="Dim pushServiceActividad As String = \"50123123595";
starter._pushserviceactividad = BA.ObjectToString("501231235959");
 //BA.debugLineNum = 26;BA.debugLine="Dim MAC_IMPRESORA As String";
starter._mac_impresora = RemoteObject.createImmutable("");
 //BA.debugLineNum = 27;BA.debugLine="Private logs As StringBuilder";
starter._logs = RemoteObject.createNew ("anywheresoftware.b4a.keywords.StringBuilderWrapper");
 //BA.debugLineNum = 28;BA.debugLine="Private logcat As LogCat";
starter._logcat = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone.LogCat");
 //BA.debugLineNum = 29;BA.debugLine="Public SharedFolder As String 'Para actualizar ap";
starter._sharedfolder = RemoteObject.createImmutable("");
 //BA.debugLineNum = 30;BA.debugLine="Dim cedisLocation As Location";
starter._cedislocation = RemoteObject.createNew ("anywheresoftware.b4a.gps.LocationWrapper");
 //BA.debugLineNum = 31;BA.debugLine="Dim reqManager As DBRequestManager";
starter._reqmanager = RemoteObject.createNew ("reparto_mazapa.keymon.lat.dbrequestmanager");
 //BA.debugLineNum = 32;BA.debugLine="Dim server As String = \"http://keymon.net:1781\"";
starter._server = BA.ObjectToString("http://keymon.net:1781");
 //BA.debugLineNum = 36;BA.debugLine="Dim muestraProgreso = 0";
starter._muestraprogreso = BA.NumberToString(0);
 //BA.debugLineNum = 37;BA.debugLine="Dim c As Cursor";
starter._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
 //BA.debugLineNum = 38;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _service_create() throws Exception{
try {
		Debug.PushSubsStack("Service_Create (starter) ","starter",7,starter.processBA,starter.mostCurrent,40);
if (RapidSub.canDelegate("service_create")) { return reparto_mazapa.keymon.lat.starter.remoteMe.runUserSub(false, "starter","service_create");}
 BA.debugLineNum = 40;BA.debugLine="Sub Service_Create";
Debug.ShouldStop(128);
 BA.debugLineNum = 43;BA.debugLine="ruta = File.DirInternal 'Ruta de la base de datos";
Debug.ShouldStop(1024);
starter._ruta = starter.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal");
 BA.debugLineNum = 45;BA.debugLine="If Not(File.Exists(ruta, \"kmt.db\")) Then File.Cop";
Debug.ShouldStop(4096);
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 = 46;BA.debugLine="Log(ruta)";
Debug.ShouldStop(8192);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","39764870",starter._ruta,0);
 BA.debugLineNum = 47;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
Debug.ShouldStop(16384);
starter._skmt.runVoidMethod ("Initialize",(Object)(starter._ruta),(Object)(BA.ObjectToString("kmt.db")),(Object)(starter.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 61;BA.debugLine="Timer1.Initialize(\"Timer1\", Interval * 1000)";
Debug.ShouldStop(268435456);
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 = 62;BA.debugLine="Timer1.Enabled = True";
Debug.ShouldStop(536870912);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 63;BA.debugLine="SharedFolder = rp.GetSafeDirDefaultExternal(\"\")";
Debug.ShouldStop(1073741824);
starter._sharedfolder = starter._rp.runMethod(true,"GetSafeDirDefaultExternal",(Object)(RemoteObject.createImmutable("")));
 BA.debugLineNum = 64;BA.debugLine="cedisLocation.Initialize";
Debug.ShouldStop(-2147483648);
starter._cedislocation.runVoidMethod ("Initialize");
 BA.debugLineNum = 67;BA.debugLine="cedisLocation.Latitude = \"0\"";
Debug.ShouldStop(4);
starter._cedislocation.runMethod(true,"setLatitude",BA.numberCast(double.class, "0"));
 BA.debugLineNum = 68;BA.debugLine="cedisLocation.Longitude = \"0\"";
Debug.ShouldStop(8);
starter._cedislocation.runMethod(true,"setLongitude",BA.numberCast(double.class, "0"));
 BA.debugLineNum = 69;BA.debugLine="End Sub";
Debug.ShouldStop(16);
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",7,starter.processBA,starter.mostCurrent,87);
if (RapidSub.canDelegate("service_destroy")) { return reparto_mazapa.keymon.lat.starter.remoteMe.runUserSub(false, "starter","service_destroy");}
 BA.debugLineNum = 87;BA.debugLine="Sub Service_Destroy";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 89;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
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",7,starter.processBA,starter.mostCurrent,71);
if (RapidSub.canDelegate("service_start")) { return reparto_mazapa.keymon.lat.starter.remoteMe.runUserSub(false, "starter","service_start", _startingintent);}
Debug.locals.put("StartingIntent", _startingintent);
 BA.debugLineNum = 71;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
Debug.ShouldStop(64);
 BA.debugLineNum = 72;BA.debugLine="Service.StopAutomaticForeground 'Starter service";
Debug.ShouldStop(128);
starter.mostCurrent._service.runVoidMethod ("StopAutomaticForeground");
 BA.debugLineNum = 76;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
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",7,starter.processBA,starter.mostCurrent,78);
if (RapidSub.canDelegate("service_taskremoved")) { return reparto_mazapa.keymon.lat.starter.remoteMe.runUserSub(false, "starter","service_taskremoved");}
 BA.debugLineNum = 78;BA.debugLine="Sub Service_TaskRemoved";
Debug.ShouldStop(8192);
 BA.debugLineNum = 80;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
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",7,starter.processBA,starter.mostCurrent,91);
if (RapidSub.canDelegate("timer1_tick")) { return reparto_mazapa.keymon.lat.starter.remoteMe.runUserSub(false, "starter","timer1_tick");}
 BA.debugLineNum = 91;BA.debugLine="Private Sub Timer1_Tick";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 94;BA.debugLine="ENVIA_ULTIMA_GPS";
Debug.ShouldStop(536870912);
_envia_ultima_gps();
 BA.debugLineNum = 95;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}