package gunav2.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",1,starter.processBA,starter.mostCurrent,149);
if (RapidSub.canDelegate("application_error")) { return gunav2.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 = 149;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
Debug.ShouldStop(1048576);
 BA.debugLineNum = 151;BA.debugLine="Dim jo As JavaObject";
Debug.ShouldStop(4194304);
_jo = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");Debug.locals.put("jo", _jo);
 BA.debugLineNum = 152;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 = 152;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 = 153;BA.debugLine="logcat.LogCatStop";
Debug.ShouldStop(16777216);
starter._logcat.runVoidMethod ("LogCatStop");
 BA.debugLineNum = 154;BA.debugLine="logs.Append(StackTrace)";
Debug.ShouldStop(33554432);
starter._logs.runVoidMethod ("Append",(Object)(_stacktrace));
 BA.debugLineNum = 155;BA.debugLine="Subs.revisaBD";
Debug.ShouldStop(67108864);
starter.mostCurrent._subs.runVoidMethod ("_revisabd" /*RemoteObject*/ ,starter.processBA);
 BA.debugLineNum = 156;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 = 157;BA.debugLine="Return True";
Debug.ShouldStop(268435456);
if (true) return starter.mostCurrent.__c.getField(true,"True");
 BA.debugLineNum = 158;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",1,starter.processBA,starter.mostCurrent,63);
if (RapidSub.canDelegate("btadmin_statechanged")) { return gunav2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","btadmin_statechanged", _newstate, _oldstate);}
Debug.locals.put("NewState", _newstate);
Debug.locals.put("OldState", _oldstate);
 BA.debugLineNum = 63;BA.debugLine="Private Sub BTAdmin_StateChanged (NewState As Int,";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 64;BA.debugLine="If logger Then Log(\"BT state changed: \" & NewStat";
Debug.ShouldStop(-2147483648);
if (starter._logger.<Boolean>get().booleanValue()) { 
starter.mostCurrent.__c.runVoidMethod ("LogImpl","0458753",RemoteObject.concat(RemoteObject.createImmutable("BT state changed: "),_newstate),0);};
 BA.debugLineNum = 65;BA.debugLine="BluetoothState = NewState = BTAdmin.STATE_ON";
Debug.ShouldStop(1);
starter._bluetoothstate = BA.ObjectToBoolean(RemoteObject.solveBoolean("=",_newstate,BA.numberCast(double.class, starter._btadmin.getField(true,"STATE_ON"))));
 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  _envia_ultima_gps() throws Exception{
try {
		Debug.PushSubsStack("ENVIA_ULTIMA_GPS (starter) ","starter",1,starter.processBA,starter.mostCurrent,101);
if (RapidSub.canDelegate("envia_ultima_gps")) { return gunav2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","envia_ultima_gps");}
RemoteObject _cmd = RemoteObject.declareNull("gunav2.keymon.com.mx.dbrequestmanager._dbcommand");
RemoteObject _s7 = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _totalstick = RemoteObject.createImmutable(0);
int _sfsdf = 0;
RemoteObject _s8 = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _totalpaquete = RemoteObject.createImmutable(0);
 BA.debugLineNum = 101;BA.debugLine="Sub ENVIA_ULTIMA_GPS";
Debug.ShouldStop(16);
 BA.debugLineNum = 102;BA.debugLine="LogColor(\"Iniciamos ENVIA_ULTIMA_GPS\", Colors.Mag";
Debug.ShouldStop(32);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","0851969",BA.ObjectToString("Iniciamos ENVIA_ULTIMA_GPS"),starter.mostCurrent.__c.getField(false,"Colors").getField(true,"Magenta"));
 BA.debugLineNum = 103;BA.debugLine="Dim skmt As SQL";
Debug.ShouldStop(64);
starter._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");
 BA.debugLineNum = 104;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(128);
_cmd = RemoteObject.createNew ("gunav2.keymon.com.mx.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 = 109;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(4096);
_cmd = RemoteObject.createNew ("gunav2.keymon.com.mx.dbrequestmanager._dbcommand");Debug.locals.put("cmd", _cmd);
 BA.debugLineNum = 110;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(8192);
_cmd.runVoidMethod ("Initialize");
 BA.debugLineNum = 111;BA.debugLine="cmd.Name = \"UPDATE_GUNA_ACTUAL2_GPS2\"";
Debug.ShouldStop(16384);
_cmd.setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("UPDATE_GUNA_ACTUAL2_GPS2"));
 BA.debugLineNum = 112;BA.debugLine="Private s7 As Cursor = B4XPages.MainPage.skmt.Exe";
Debug.ShouldStop(32768);
_s7 = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_s7 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select SUM(PE_CANT) AS PE_CANT, PE_PROID FROM PEDIDO WHERE PE_PROID IN (SELECT CAT_GP_ID FROM CAT_GUNAPROD WHERE CAT_GP_TIPO = 'CIGARRO') GROUP BY PE_PROID"))));Debug.locals.put("s7", _s7);Debug.locals.put("s7", _s7);
 BA.debugLineNum = 113;BA.debugLine="If s7.RowCount > 0 Then";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean(">",_s7.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 114;BA.debugLine="Dim totalstick As Int = 0";
Debug.ShouldStop(131072);
_totalstick = BA.numberCast(int.class, 0);Debug.locals.put("totalstick", _totalstick);Debug.locals.put("totalstick", _totalstick);
 BA.debugLineNum = 115;BA.debugLine="For sfsdf = 0 To s7.RowCount -1";
Debug.ShouldStop(262144);
{
final int step11 = 1;
final int limit11 = RemoteObject.solve(new RemoteObject[] {_s7.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_sfsdf = 0 ;
for (;(step11 > 0 && _sfsdf <= limit11) || (step11 < 0 && _sfsdf >= limit11) ;_sfsdf = ((int)(0 + _sfsdf + step11))  ) {
Debug.locals.put("sfsdf", _sfsdf);
 BA.debugLineNum = 116;BA.debugLine="s7.Position= sfsdf";
Debug.ShouldStop(524288);
_s7.runMethod(true,"setPosition",BA.numberCast(int.class, _sfsdf));
 BA.debugLineNum = 117;BA.debugLine="Log(\"ENTRE AQUI\")";
Debug.ShouldStop(1048576);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","0851984",RemoteObject.createImmutable("ENTRE AQUI"),0);
 BA.debugLineNum = 118;BA.debugLine="Dim s8 As Cursor = B4XPages.MainPage.skmt.ExecQ";
Debug.ShouldStop(2097152);
_s8 = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_s8 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("SELECT ifnull(CAT_GP_CONVERSION3,0) as CAT_GP_CONVERSION3 FROM CAT_GUNAPROD WHERE CAT_GP_ID = '"),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_s7.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_PROID")))))),RemoteObject.createImmutable("'"))))));Debug.locals.put("s8", _s8);Debug.locals.put("s8", _s8);
 BA.debugLineNum = 119;BA.debugLine="s8.Position = 0";
Debug.ShouldStop(4194304);
_s8.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 120;BA.debugLine="totalstick = totalstick + (s7.GetString(\"PE_CAN";
Debug.ShouldStop(8388608);
_totalstick = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_totalstick,(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _s7.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("PE_CANT")))),BA.numberCast(double.class, _s8.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_GP_CONVERSION3"))))}, "*",0, 0))}, "+",1, 0));Debug.locals.put("totalstick", _totalstick);
 BA.debugLineNum = 121;BA.debugLine="Dim totalpaquete As Int = 0";
Debug.ShouldStop(16777216);
_totalpaquete = BA.numberCast(int.class, 0);Debug.locals.put("totalpaquete", _totalpaquete);Debug.locals.put("totalpaquete", _totalpaquete);
 BA.debugLineNum = 123;BA.debugLine="totalpaquete = totalpaquete +(totalstick/200)";
Debug.ShouldStop(67108864);
_totalpaquete = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_totalpaquete,(RemoteObject.solve(new RemoteObject[] {_totalstick,RemoteObject.createImmutable(200)}, "/",0, 0))}, "+",1, 0));Debug.locals.put("totalpaquete", _totalpaquete);
 BA.debugLineNum = 124;BA.debugLine="Log(totalpaquete)";
Debug.ShouldStop(134217728);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","0851991",BA.NumberToString(_totalpaquete),0);
 }
}Debug.locals.put("sfsdf", _sfsdf);
;
 };
 BA.debugLineNum = 130;BA.debugLine="cmd.Parameters = Array As Object(NumberFormat2(B4";
Debug.ShouldStop(2);
_cmd.setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {13},new Object[] {(starter.mostCurrent.__c.runMethod(true,"NumberFormat2",(Object)(BA.numberCast(double.class, starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(true,"_montoactual" /*RemoteObject*/ ))),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(starter.mostCurrent.__c.getField(true,"False")))),(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)),(_totalpaquete),(_totalstick),(starter._encuesta),(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 = 132;BA.debugLine="reqManager.ExecuteCommand(cmd, \"actualizaUltimaGP";
Debug.ShouldStop(8);
starter._reqmanager.runClassMethod (gunav2.keymon.com.mx.dbrequestmanager.class, "_executecommand" /*RemoteObject*/ ,(Object)(_cmd),(Object)((RemoteObject.createImmutable("actualizaUltimaGPS"))));
 BA.debugLineNum = 133;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 = 135;BA.debugLine="Timer1.Enabled = False";
Debug.ShouldStop(64);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 136;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 = 137;BA.debugLine="Timer1.Enabled = True";
Debug.ShouldStop(256);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"True"));
 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  _gps_locationchanged(RemoteObject _location1) throws Exception{
try {
		Debug.PushSubsStack("GPS_LocationChanged (starter) ","starter",1,starter.processBA,starter.mostCurrent,89);
if (RapidSub.canDelegate("gps_locationchanged")) { return gunav2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","gps_locationchanged", _location1);}
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 89;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 91;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _jobdone(RemoteObject _job) throws Exception{
try {
		Debug.PushSubsStack("JobDone (starter) ","starter",1,starter.processBA,starter.mostCurrent,160);
if (RapidSub.canDelegate("jobdone")) { return gunav2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","jobdone", _job);}
RemoteObject _result = RemoteObject.declareNull("gunav2.keymon.com.mx.dbrequestmanager._dbresult");
Debug.locals.put("Job", _job);
 BA.debugLineNum = 160;BA.debugLine="Sub JobDone(Job As HttpJob)";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 161;BA.debugLine="Log(\"JOBDONE STARTER\")";
Debug.ShouldStop(1);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","01048577",RemoteObject.createImmutable("JOBDONE STARTER"),0);
 BA.debugLineNum = 163;BA.debugLine="If Job.Success = False Then ' Si hay unerror en e";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_success" /*RemoteObject*/ ),starter.mostCurrent.__c.getField(true,"False"))) { 
 BA.debugLineNum = 165;BA.debugLine="LogColor(\"Error: \" & Job.ErrorMessage, Colors.re";
Debug.ShouldStop(16);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","01048581",RemoteObject.concat(RemoteObject.createImmutable("Error: "),_job.getField(true,"_errormessage" /*RemoteObject*/ )),starter.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 }else {
 BA.debugLineNum = 167;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_jobname" /*RemoteObject*/ ),BA.ObjectToString("DBRequest"))) { 
 BA.debugLineNum = 168;BA.debugLine="Dim RESULT As DBResult = B4XPages.MainPage.reqM";
Debug.ShouldStop(128);
_result = starter.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,starter.processBA).getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (gunav2.keymon.com.mx.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job));Debug.locals.put("RESULT", _result);Debug.locals.put("RESULT", _result);
 BA.debugLineNum = 169;BA.debugLine="Log($\"Tag: ${RESULT.tag}, success=${Job.Success";
Debug.ShouldStop(256);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","01048585",(RemoteObject.concat(RemoteObject.createImmutable("Tag: "),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_result.getField(false,"Tag" /*RemoteObject*/ ))),RemoteObject.createImmutable(", success="),starter.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_job.getField(true,"_success" /*RemoteObject*/ )))),RemoteObject.createImmutable(""))),0);
 };
 };
 BA.debugLineNum = 173;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",1,starter.processBA,starter.mostCurrent,141);
if (RapidSub.canDelegate("logcat_logcatdata")) { return gunav2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","logcat_logcatdata", _buffer, _length);}
Debug.locals.put("Buffer", _buffer);
Debug.locals.put("Length", _length);
 BA.debugLineNum = 141;BA.debugLine="Private Sub logcat_LogCatData (Buffer() As Byte, L";
Debug.ShouldStop(4096);
 BA.debugLineNum = 142;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 = 143;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 = 144;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 = 146;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 ph As Phone";
starter._ph = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone");
 //BA.debugLineNum = 11;BA.debugLine="Dim skmt As SQL";
starter._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");
 //BA.debugLineNum = 12;BA.debugLine="Public rp As RuntimePermissions";
starter._rp = RemoteObject.createNew ("anywheresoftware.b4a.objects.RuntimePermissions");
 //BA.debugLineNum = 13;BA.debugLine="Public FLP As FusedLocationProvider";
starter._flp = RemoteObject.createNew ("uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper");
 //BA.debugLineNum = 15;BA.debugLine="Dim reqManager As DBRequestManager";
starter._reqmanager = RemoteObject.createNew ("gunav2.keymon.com.mx.dbrequestmanager");
 //BA.debugLineNum = 16;BA.debugLine="Dim server As String = \"http://keymon.net:1782\"";
starter._server = BA.ObjectToString("http://keymon.net:1782");
 //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 = 20;BA.debugLine="Dim ruta As String = File.DirInternal";
starter._ruta = starter.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal");
 //BA.debugLineNum = 22;BA.debugLine="Private logs As StringBuilder";
starter._logs = RemoteObject.createNew ("anywheresoftware.b4a.keywords.StringBuilderWrapper");
 //BA.debugLineNum = 23;BA.debugLine="Private logcat As LogCat";
starter._logcat = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone.LogCat");
 //BA.debugLineNum = 24;BA.debugLine="Dim logger As Boolean = False";
starter._logger = starter.mostCurrent.__c.getField(true,"False");
 //BA.debugLineNum = 25;BA.debugLine="Dim marcaCel As String = ph.manufacturer";
starter._marcacel = starter._ph.runMethod(true,"getManufacturer");
 //BA.debugLineNum = 26;BA.debugLine="Private BTAdmin As BluetoothAdmin";
starter._btadmin = RemoteObject.createNew ("anywheresoftware.b4a.objects.Serial.BluetoothAdmin");
 //BA.debugLineNum = 27;BA.debugLine="Dim MAC_IMPRESORA As String";
starter._mac_impresora = RemoteObject.createImmutable("");
 //BA.debugLineNum = 28;BA.debugLine="Public BluetoothState As Boolean";
starter._bluetoothstate = RemoteObject.createImmutable(false);
 //BA.debugLineNum = 29;BA.debugLine="Dim ubicacionActual As Location";
starter._ubicacionactual = RemoteObject.createNew ("anywheresoftware.b4a.gps.LocationWrapper");
 //BA.debugLineNum = 30;BA.debugLine="Dim enVenta As Boolean = False";
starter._enventa = starter.mostCurrent.__c.getField(true,"False");
 //BA.debugLineNum = 31;BA.debugLine="Dim muestraProgreso = 0 'Parte de la funcionalida";
starter._muestraprogreso = BA.NumberToString(0);
 //BA.debugLineNum = 32;BA.debugLine="Public newApp As mNewVersion 'Parte de la funcion";
starter._newapp = RemoteObject.createNew ("gunav2.keymon.com.mx.appupdater._mnewversion");
 //BA.debugLineNum = 33;BA.debugLine="Dim nuevoLink As String";
starter._nuevolink = RemoteObject.createImmutable("");
 //BA.debugLineNum = 34;BA.debugLine="Dim idCliente As String = \"\"";
starter._idcliente = BA.ObjectToString("");
 //BA.debugLineNum = 35;BA.debugLine="Dim encuesta As String = 0";
starter._encuesta = BA.NumberToString(0);
 //BA.debugLineNum = 36;BA.debugLine="Public fFileProvider As FileProvider";
starter._ffileprovider = RemoteObject.createNew ("gunav2.keymon.com.mx.fileprovider");
 //BA.debugLineNum = 37;BA.debugLine="Dim tabla As String";
starter._tabla = RemoteObject.createImmutable("");
 //BA.debugLineNum = 38;BA.debugLine="Dim enCliente As Boolean = False";
starter._encliente = starter.mostCurrent.__c.getField(true,"False");
 //BA.debugLineNum = 39;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _service_create() throws Exception{
try {
		Debug.PushSubsStack("Service_Create (starter) ","starter",1,starter.processBA,starter.mostCurrent,41);
if (RapidSub.canDelegate("service_create")) { return gunav2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","service_create");}
 BA.debugLineNum = 41;BA.debugLine="Sub Service_Create";
Debug.ShouldStop(256);
 BA.debugLineNum = 44;BA.debugLine="gps.Initialize(\"GPS\")";
Debug.ShouldStop(2048);
starter._gps.runVoidMethod ("Initialize",(Object)(RemoteObject.createImmutable("GPS")));
 BA.debugLineNum = 45;BA.debugLine="CallSubDelayed(FirebaseMessaging, \"SubscribeToTop";
Debug.ShouldStop(4096);
starter.mostCurrent.__c.runVoidMethod ("CallSubDelayed",starter.processBA,(Object)((starter.mostCurrent._firebasemessaging.getObject())),(Object)(RemoteObject.createImmutable("SubscribeToTopics")));
 BA.debugLineNum = 46;BA.debugLine="BTAdmin.Initialize(\"admin\")";
Debug.ShouldStop(8192);
starter._btadmin.runVoidMethod ("Initialize",starter.processBA,(Object)(RemoteObject.createImmutable("admin")));
 BA.debugLineNum = 47;BA.debugLine="Timer1.Initialize(\"Timer1\", Interval * 1000)";
Debug.ShouldStop(16384);
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 = 48;BA.debugLine="Timer1.Enabled = True";
Debug.ShouldStop(32768);
starter._timer1.runMethod(true,"setEnabled",starter.mostCurrent.__c.getField(true,"True"));
 BA.debugLineNum = 53;BA.debugLine="logs.Initialize";
Debug.ShouldStop(1048576);
starter._logs.runVoidMethod ("Initialize");
 BA.debugLineNum = 54;BA.debugLine="fFileProvider.Initialize";
Debug.ShouldStop(2097152);
starter._ffileprovider.runClassMethod (gunav2.keymon.com.mx.fileprovider.class, "_initialize" /*RemoteObject*/ ,starter.processBA);
 BA.debugLineNum = 55;BA.debugLine="CallSubDelayed(FirebaseMessaging, \"SubscribeToTop";
Debug.ShouldStop(4194304);
starter.mostCurrent.__c.runVoidMethod ("CallSubDelayed",starter.processBA,(Object)((starter.mostCurrent._firebasemessaging.getObject())),(Object)(RemoteObject.createImmutable("SubscribeToTopics")));
 BA.debugLineNum = 56;BA.debugLine="ubicacionActual.Initialize";
Debug.ShouldStop(8388608);
starter._ubicacionactual.runVoidMethod ("Initialize");
 BA.debugLineNum = 57;BA.debugLine="If File.Exists(File.DirInternal, \"kmt.db\") = Fals";
Debug.ShouldStop(16777216);
if (RemoteObject.solveBoolean("=",starter.mostCurrent.__c.getField(false,"File").runMethod(true,"Exists",(Object)(starter.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(RemoteObject.createImmutable("kmt.db"))),starter.mostCurrent.__c.getField(true,"False"))) { 
 BA.debugLineNum = 58;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", File.DirInte";
Debug.ShouldStop(33554432);
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.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(RemoteObject.createImmutable("kmt.db")));
 };
 BA.debugLineNum = 60;BA.debugLine="skmt.Initialize(File.DirInternal,\"kmt.db\", True)";
Debug.ShouldStop(134217728);
starter._skmt.runVoidMethod ("Initialize",(Object)(starter.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(BA.ObjectToString("kmt.db")),(Object)(starter.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 61;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
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",1,starter.processBA,starter.mostCurrent,97);
if (RapidSub.canDelegate("service_destroy")) { return gunav2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","service_destroy");}
 BA.debugLineNum = 97;BA.debugLine="Sub Service_Destroy";
Debug.ShouldStop(1);
 BA.debugLineNum = 99;BA.debugLine="End Sub";
Debug.ShouldStop(4);
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",1,starter.processBA,starter.mostCurrent,69);
if (RapidSub.canDelegate("service_start")) { return gunav2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","service_start", _startingintent);}
RemoteObject _s = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
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 = 71;BA.debugLine="Subs.revisaBD";
Debug.ShouldStop(64);
starter.mostCurrent._subs.runVoidMethod ("_revisabd" /*RemoteObject*/ ,starter.processBA);
 BA.debugLineNum = 72;BA.debugLine="Log(marcaCel)";
Debug.ShouldStop(128);
starter.mostCurrent.__c.runVoidMethod ("LogImpl","0524291",starter._marcacel,0);
 BA.debugLineNum = 73;BA.debugLine="Private s As Cursor = skmt.ExecQuery(\"select * fr";
Debug.ShouldStop(256);
_s = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_s = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), starter._skmt.runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select * from cat_variables where cat_va_descripcion = 'DBReqServer'"))));Debug.locals.put("s", _s);Debug.locals.put("s", _s);
 BA.debugLineNum = 74;BA.debugLine="If s.RowCount > 0 Then 'Si tenemso valor en BD lo";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean(">",_s.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 75;BA.debugLine="s.Position = 0";
Debug.ShouldStop(1024);
_s.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 76;BA.debugLine="server = s.GetString(\"CAT_VA_VALOR\")";
Debug.ShouldStop(2048);
starter._server = _s.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_VALOR")));
 }else {
 BA.debugLineNum = 78;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES wh";
Debug.ShouldStop(8192);
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("DBReqServer"))})))));
 BA.debugLineNum = 79;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(CA";
Debug.ShouldStop(16384);
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(("DBReqServer")),(starter._server)})))));
 };
 BA.debugLineNum = 81;BA.debugLine="reqManager.Initialize(Me, server)";
Debug.ShouldStop(65536);
starter._reqmanager.runClassMethod (gunav2.keymon.com.mx.dbrequestmanager.class, "_initialize" /*RemoteObject*/ ,starter.processBA,(Object)(starter.getObject()),(Object)(starter._server));
 BA.debugLineNum = 82;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
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",1,starter.processBA,starter.mostCurrent,93);
if (RapidSub.canDelegate("service_taskremoved")) { return gunav2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","service_taskremoved");}
 BA.debugLineNum = 93;BA.debugLine="Sub Service_TaskRemoved";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 95;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
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",1,starter.processBA,starter.mostCurrent,84);
if (RapidSub.canDelegate("timer1_tick")) { return gunav2.keymon.com.mx.starter.remoteMe.runUserSub(false, "starter","timer1_tick");}
 BA.debugLineNum = 84;BA.debugLine="Private Sub Timer1_Tick";
Debug.ShouldStop(524288);
 BA.debugLineNum = 86;BA.debugLine="ENVIA_ULTIMA_GPS";
Debug.ShouldStop(2097152);
_envia_ultima_gps();
 BA.debugLineNum = 87;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}