package keymon.lat.medicomed;

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

public class tracker_subs_0 {


public static RemoteObject  _createlocationrequest() throws Exception{
try {
		Debug.PushSubsStack("CreateLocationRequest (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,111);
if (RapidSub.canDelegate("createlocationrequest")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","createlocationrequest");}
RemoteObject _lr = RemoteObject.declareNull("uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest");
 BA.debugLineNum = 111;BA.debugLine="Private Sub CreateLocationRequest As LocationReque";
Debug.ShouldStop(16384);
 BA.debugLineNum = 113;BA.debugLine="Dim lr As LocationRequest";
Debug.ShouldStop(65536);
_lr = RemoteObject.createNew ("uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest");Debug.locals.put("lr", _lr);
 BA.debugLineNum = 114;BA.debugLine="lr.Initialize";
Debug.ShouldStop(131072);
_lr.runVoidMethod ("Initialize");
 BA.debugLineNum = 115;BA.debugLine="lr.SetInterval(10000) 'Intervalo deseado para act";
Debug.ShouldStop(262144);
_lr.runVoidMethod ("SetInterval",(Object)(BA.numberCast(long.class, 10000)));
 BA.debugLineNum = 116;BA.debugLine="lr.SetFastestInterval(lr.GetInterval / 2) 'Interv";
Debug.ShouldStop(524288);
_lr.runVoidMethod ("SetFastestInterval",(Object)(BA.numberCast(long.class, RemoteObject.solve(new RemoteObject[] {_lr.runMethod(true,"GetInterval"),RemoteObject.createImmutable(2)}, "/",0, 0))));
 BA.debugLineNum = 117;BA.debugLine="lr.SetSmallestDisplacement(50) 'Solo registra cam";
Debug.ShouldStop(1048576);
_lr.runVoidMethod ("SetSmallestDisplacement",(Object)(BA.numberCast(float.class, 50)));
 BA.debugLineNum = 118;BA.debugLine="lr.SetPriority(lr.Priority.PRIORITY_HIGH_ACCURACY";
Debug.ShouldStop(2097152);
_lr.runVoidMethod ("SetPriority",(Object)(_lr.getField(false,"Priority").getField(true,"PRIORITY_HIGH_ACCURACY")));
 BA.debugLineNum = 119;BA.debugLine="actualLR=lr";
Debug.ShouldStop(4194304);
tracker._actuallr = _lr;
 BA.debugLineNum = 120;BA.debugLine="Return lr";
Debug.ShouldStop(8388608);
if (true) return _lr;
 BA.debugLineNum = 121;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _createlocationrequestsmalld() throws Exception{
try {
		Debug.PushSubsStack("CreateLocationRequestSmallD (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,123);
if (RapidSub.canDelegate("createlocationrequestsmalld")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","createlocationrequestsmalld");}
RemoteObject _lr = RemoteObject.declareNull("uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest");
 BA.debugLineNum = 123;BA.debugLine="Private Sub CreateLocationRequestSmallD As Locatio";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 125;BA.debugLine="Dim lr As LocationRequest";
Debug.ShouldStop(268435456);
_lr = RemoteObject.createNew ("uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest");Debug.locals.put("lr", _lr);
 BA.debugLineNum = 126;BA.debugLine="lr.Initialize";
Debug.ShouldStop(536870912);
_lr.runVoidMethod ("Initialize");
 BA.debugLineNum = 127;BA.debugLine="lr.SetInterval(2000) 'Intervalo deseado para actu";
Debug.ShouldStop(1073741824);
_lr.runVoidMethod ("SetInterval",(Object)(BA.numberCast(long.class, 2000)));
 BA.debugLineNum = 128;BA.debugLine="lr.SetFastestInterval(lr.GetInterval / 2) 'Interv";
Debug.ShouldStop(-2147483648);
_lr.runVoidMethod ("SetFastestInterval",(Object)(BA.numberCast(long.class, RemoteObject.solve(new RemoteObject[] {_lr.runMethod(true,"GetInterval"),RemoteObject.createImmutable(2)}, "/",0, 0))));
 BA.debugLineNum = 129;BA.debugLine="lr.setNumUpdates(2) 'Solicitamos solo 2 actualiza";
Debug.ShouldStop(1);
_lr.runVoidMethod ("SetNumUpdates",(Object)(BA.numberCast(int.class, 2)));
 BA.debugLineNum = 130;BA.debugLine="lr.SetSmallestDisplacement(0) 'Solo registra camb";
Debug.ShouldStop(2);
_lr.runVoidMethod ("SetSmallestDisplacement",(Object)(BA.numberCast(float.class, 0)));
 BA.debugLineNum = 131;BA.debugLine="lr.SetPriority(lr.Priority.PRIORITY_HIGH_ACCURACY";
Debug.ShouldStop(4);
_lr.runVoidMethod ("SetPriority",(Object)(_lr.getField(false,"Priority").getField(true,"PRIORITY_HIGH_ACCURACY")));
 BA.debugLineNum = 132;BA.debugLine="actualLR=lr";
Debug.ShouldStop(8);
tracker._actuallr = _lr;
 BA.debugLineNum = 133;BA.debugLine="Return lr";
Debug.ShouldStop(16);
if (true) return _lr;
 BA.debugLineNum = 134;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _createnotification(RemoteObject _body) throws Exception{
try {
		Debug.PushSubsStack("CreateNotification (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,194);
if (RapidSub.canDelegate("createnotification")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","createnotification", _body);}
RemoteObject _notification = RemoteObject.declareNull("anywheresoftware.b4a.objects.NotificationWrapper");
Debug.locals.put("Body", _body);
 BA.debugLineNum = 194;BA.debugLine="Sub CreateNotification (Body As String) As Notific";
Debug.ShouldStop(2);
 BA.debugLineNum = 195;BA.debugLine="Dim notification As Notification";
Debug.ShouldStop(4);
_notification = RemoteObject.createNew ("anywheresoftware.b4a.objects.NotificationWrapper");Debug.locals.put("notification", _notification);
 BA.debugLineNum = 196;BA.debugLine="notification.Initialize2(notification.IMPORTANCE_";
Debug.ShouldStop(8);
_notification.runVoidMethod ("Initialize2",(Object)(_notification.getField(true,"IMPORTANCE_LOW")));
 BA.debugLineNum = 197;BA.debugLine="notification.Icon = \"icon\"";
Debug.ShouldStop(16);
_notification.runVoidMethod ("setIcon",BA.ObjectToString("icon"));
 BA.debugLineNum = 198;BA.debugLine="notification.SetInfo(\"Medicomed\", Body, Main)";
Debug.ShouldStop(32);
_notification.runVoidMethod ("SetInfoNew",tracker.processBA,(Object)(BA.ObjectToCharSequence("Medicomed")),(Object)(BA.ObjectToCharSequence(_body)),(Object)((tracker.mostCurrent._main.getObject())));
 BA.debugLineNum = 199;BA.debugLine="Return notification";
Debug.ShouldStop(64);
if (true) return _notification;
 BA.debugLineNum = 200;BA.debugLine="End Sub";
Debug.ShouldStop(128);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _dameultimaubicacionconocida() throws Exception{
try {
		Debug.PushSubsStack("dameUltimaUbicacionConocida (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,136);
if (RapidSub.canDelegate("dameultimaubicacionconocida")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","dameultimaubicacionconocida");}
RemoteObject _coords = RemoteObject.createImmutable("");
 BA.debugLineNum = 136;BA.debugLine="Sub dameUltimaUbicacionConocida";
Debug.ShouldStop(128);
 BA.debugLineNum = 137;BA.debugLine="If FLP.GetLastKnownLocation.IsInitialized Then 'M";
Debug.ShouldStop(256);
if (tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"IsInitialized").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 139;BA.debugLine="If Starter.Logger Then LogColor($\"Mandamos UUC \"";
Debug.ShouldStop(1024);
if (tracker.mostCurrent._starter._logger /*RemoteObject*/ .<Boolean>get().booleanValue()) { 
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","329687811",(RemoteObject.concat(RemoteObject.createImmutable("Mandamos UUC \""),tracker.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((tracker.mostCurrent._subs.runMethod(true,"_fechakmt" /*RemoteObject*/ ,tracker.processBA,(Object)(BA.NumberToString(tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getTime"))))))),RemoteObject.createImmutable("|Acc:"),tracker.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.2")),(Object)((tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getAccuracy")))),RemoteObject.createImmutable("|"),tracker.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.8")),(Object)((tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getLatitude")))),RemoteObject.createImmutable("|"),tracker.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.8")),(Object)((tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getLongitude")))),RemoteObject.createImmutable("|Spd:"),tracker.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.2")),(Object)((tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getSpeed")))),RemoteObject.createImmutable("|"))),tracker.mostCurrent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 255)),(Object)(BA.numberCast(int.class, 112)),(Object)(BA.numberCast(int.class, 35))));};
 BA.debugLineNum = 140;BA.debugLine="Dim coords As String = FLP.GetLastKnownLocation.";
Debug.ShouldStop(2048);
_coords = RemoteObject.concat(tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getLatitude"),RemoteObject.createImmutable(","),tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getLongitude"),RemoteObject.createImmutable(","),_formatofecha(BA.NumberToString(tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getTime"))));Debug.locals.put("coords", _coords);Debug.locals.put("coords", _coords);
 };
 BA.debugLineNum = 144;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _flp_connectionfailed(RemoteObject _connectionresult1) throws Exception{
try {
		Debug.PushSubsStack("flp_ConnectionFailed (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,55);
if (RapidSub.canDelegate("flp_connectionfailed")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","flp_connectionfailed", _connectionresult1);}
Debug.locals.put("ConnectionResult1", _connectionresult1);
 BA.debugLineNum = 55;BA.debugLine="Sub flp_ConnectionFailed(ConnectionResult1 As Int)";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 56;BA.debugLine="Log(\"Failed to connect to location provider\")";
Debug.ShouldStop(8388608);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","329229057",RemoteObject.createImmutable("Failed to connect to location provider"),0);
 BA.debugLineNum = 57;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _flp_connectionsuccess() throws Exception{
try {
		Debug.PushSubsStack("flp_ConnectionSuccess (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,50);
if (RapidSub.canDelegate("flp_connectionsuccess")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","flp_connectionsuccess");}
 BA.debugLineNum = 50;BA.debugLine="Sub flp_ConnectionSuccess";
Debug.ShouldStop(131072);
 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  _flp_locationchanged(RemoteObject _location1) throws Exception{
try {
		Debug.PushSubsStack("flp_LocationChanged (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,154);
if (RapidSub.canDelegate("flp_locationchanged")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","flp_locationchanged", _location1);}
RemoteObject _sdate = RemoteObject.createImmutable("");
RemoteObject _stime = RemoteObject.createImmutable("");
RemoteObject _coords = RemoteObject.createImmutable("");
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 154;BA.debugLine="Sub flp_LocationChanged (Location1 As Location)";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 157;BA.debugLine="B4XPages.MainPage.lat_gps = Location1.Latitude";
Debug.ShouldStop(268435456);
tracker.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,tracker.processBA).setField ("_lat_gps" /*RemoteObject*/ ,BA.NumberToString(_location1.runMethod(true,"getLatitude")));
 BA.debugLineNum = 158;BA.debugLine="B4XPages.MainPage.lon_gps = Location1.Longitude";
Debug.ShouldStop(536870912);
tracker.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,tracker.processBA).setField ("_lon_gps" /*RemoteObject*/ ,BA.NumberToString(_location1.runMethod(true,"getLongitude")));
 BA.debugLineNum = 159;BA.debugLine="UUGCoords = Location1";
Debug.ShouldStop(1073741824);
tracker._uugcoords = _location1;
 BA.debugLineNum = 167;BA.debugLine="Dim sDate,sTime As String";
Debug.ShouldStop(64);
_sdate = RemoteObject.createImmutable("");Debug.locals.put("sDate", _sdate);
_stime = RemoteObject.createImmutable("");Debug.locals.put("sTime", _stime);
 BA.debugLineNum = 168;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(128);
tracker.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 169;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(256);
_sdate = tracker.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(tracker.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow")));Debug.locals.put("sDate", _sdate);
 BA.debugLineNum = 170;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(512);
_stime = tracker.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(tracker.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow")));Debug.locals.put("sTime", _stime);
 BA.debugLineNum = 171;BA.debugLine="If Not(B4XPages.MainPage.skmt.IsInitialized) Then";
Debug.ShouldStop(1024);
if (tracker.mostCurrent.__c.runMethod(true,"Not",(Object)(tracker.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,tracker.processBA).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
tracker.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,tracker.processBA).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("Initialize",(Object)(tracker.mostCurrent._starter._ruta /*RemoteObject*/ ),(Object)(BA.ObjectToString("kmt.db")),(Object)(tracker.mostCurrent.__c.getField(true,"True")));};
 BA.debugLineNum = 172;BA.debugLine="Try";
Debug.ShouldStop(2048);
try { BA.debugLineNum = 173;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(4096);
tracker.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,tracker.processBA).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  HIST_GPS (HGDATE, HGLAT, HGLON) VALUES(?,?,?) ")),(Object)(tracker.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {3},new Object[] {(RemoteObject.concat(_sdate,_stime)),(tracker.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,tracker.processBA).getField(true,"_lat_gps" /*RemoteObject*/ )),(tracker.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,tracker.processBA).getField(true,"_lon_gps" /*RemoteObject*/ ))})))));
 BA.debugLineNum = 174;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
Debug.ShouldStop(8192);
tracker.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,tracker.processBA).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("DELETE FROM HIST_GPS")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e13) {
			BA.rdebugUtils.runVoidMethod("setLastException",tracker.processBA, e13.toString()); BA.debugLineNum = 176;BA.debugLine="LogColor(LastException, Colors.Red)";
Debug.ShouldStop(32768);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","329818902",BA.ObjectToString(tracker.mostCurrent.__c.runMethod(false,"LastException",tracker.processBA)),tracker.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 179;BA.debugLine="Dim coords As String = Location1.Latitude&\",\"&Loc";
Debug.ShouldStop(262144);
_coords = RemoteObject.concat(_location1.runMethod(true,"getLatitude"),RemoteObject.createImmutable(","),_location1.runMethod(true,"getLongitude"),RemoteObject.createImmutable(","),_formatofecha(BA.NumberToString(_location1.runMethod(true,"getTime"))));Debug.locals.put("coords", _coords);Debug.locals.put("coords", _coords);
 BA.debugLineNum = 184;BA.debugLine="If Location1.Accuracy < 100 Then";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("<",_location1.runMethod(true,"getAccuracy"),BA.numberCast(double.class, 100))) { 
 };
 BA.debugLineNum = 188;BA.debugLine="CallSub2(Starter, \"GPS_LocationChanged\", Location";
Debug.ShouldStop(134217728);
tracker.mostCurrent.__c.runMethodAndSync(false,"CallSubNew2",tracker.processBA,(Object)((tracker.mostCurrent._starter.getObject())),(Object)(BA.ObjectToString("GPS_LocationChanged")),(Object)((_location1)));
 BA.debugLineNum = 192;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _formatofecha(RemoteObject _fecha) throws Exception{
try {
		Debug.PushSubsStack("formatoFecha (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,210);
if (RapidSub.canDelegate("formatofecha")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","formatofecha", _fecha);}
RemoteObject _origformat = RemoteObject.createImmutable("");
RemoteObject _lastupdate = RemoteObject.createImmutable("");
Debug.locals.put("fecha", _fecha);
 BA.debugLineNum = 210;BA.debugLine="Sub formatoFecha(fecha As String) As String 'Convi";
Debug.ShouldStop(131072);
 BA.debugLineNum = 212;BA.debugLine="Dim OrigFormat As String = DateTime.DateFormat  '";
Debug.ShouldStop(524288);
_origformat = tracker.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getDateFormat");Debug.locals.put("OrigFormat", _origformat);Debug.locals.put("OrigFormat", _origformat);
 BA.debugLineNum = 213;BA.debugLine="DateTime.DateFormat=\"yyMMddHHmmss\"";
Debug.ShouldStop(1048576);
tracker.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("yyMMddHHmmss"));
 BA.debugLineNum = 214;BA.debugLine="Dim lastUpdate As String=DateTime.Date(fecha)";
Debug.ShouldStop(2097152);
_lastupdate = tracker.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(BA.numberCast(long.class, _fecha)));Debug.locals.put("lastUpdate", _lastupdate);Debug.locals.put("lastUpdate", _lastupdate);
 BA.debugLineNum = 215;BA.debugLine="DateTime.DateFormat=OrigFormat  'return to orig d";
Debug.ShouldStop(4194304);
tracker.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",_origformat);
 BA.debugLineNum = 217;BA.debugLine="Return lastUpdate";
Debug.ShouldStop(16777216);
if (true) return _lastupdate;
 BA.debugLineNum = 218;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 29;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 30;BA.debugLine="Private nid As Int = 51042";
tracker._nid = BA.numberCast(int.class, 51042);
 //BA.debugLineNum = 31;BA.debugLine="Private Tracking As Boolean";
tracker._tracking = RemoteObject.createImmutable(false);
 //BA.debugLineNum = 32;BA.debugLine="Private lock As PhoneWakeState";
tracker._lock = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone.PhoneWakeState");
 //BA.debugLineNum = 34;BA.debugLine="Public FLP As FusedLocationProvider";
tracker._flp = RemoteObject.createNew ("uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper");
 //BA.debugLineNum = 35;BA.debugLine="Dim actualLR As LocationRequest";
tracker._actuallr = RemoteObject.createNew ("uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest");
 //BA.debugLineNum = 36;BA.debugLine="Private flpStarted As Boolean";
tracker._flpstarted = RemoteObject.createImmutable(false);
 //BA.debugLineNum = 38;BA.debugLine="Dim UUGCoords As Location 'Ultima Ubicacion Guard";
tracker._uugcoords = RemoteObject.createNew ("anywheresoftware.b4a.gps.LocationWrapper");
 //BA.debugLineNum = 39;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _revisaflp() throws Exception{
try {
		Debug.PushSubsStack("revisaFLP (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,221);
if (RapidSub.canDelegate("revisaflp")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","revisaflp");}
RemoteObject _todobienflp = RemoteObject.createImmutable(false);
 BA.debugLineNum = 221;BA.debugLine="Sub revisaFLP 'ignore";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 222;BA.debugLine="LogColor(\"**** **** Revisamos FLP **** ****\", Col";
Debug.ShouldStop(536870912);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330081025",BA.ObjectToString("**** **** Revisamos FLP **** ****"),tracker.mostCurrent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 78)),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 227))));
 BA.debugLineNum = 223;BA.debugLine="Private todoBienFLP As Boolean = True";
Debug.ShouldStop(1073741824);
_todobienflp = tracker.mostCurrent.__c.getField(true,"True");Debug.locals.put("todoBienFLP", _todobienflp);Debug.locals.put("todoBienFLP", _todobienflp);
 BA.debugLineNum = 224;BA.debugLine="Try";
Debug.ShouldStop(-2147483648);
try { BA.debugLineNum = 225;BA.debugLine="If Not(FLP.IsInitialized) Then";
Debug.ShouldStop(1);
if (tracker.mostCurrent.__c.runMethod(true,"Not",(Object)(tracker._flp.runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 226;BA.debugLine="Subs.log2DB(\"revisaFLP: No esta inicializado ..";
Debug.ShouldStop(2);
tracker.mostCurrent._subs.runVoidMethod ("_log2db" /*RemoteObject*/ ,tracker.processBA,(Object)(RemoteObject.createImmutable("revisaFLP: No esta inicializado ... 'Reinicializando FLP'")));
 BA.debugLineNum = 227;BA.debugLine="FLP.Initialize(\"flp\")";
Debug.ShouldStop(4);
tracker._flp.runVoidMethod ("Initialize",tracker.processBA,(Object)(RemoteObject.createImmutable("flp")));
 BA.debugLineNum = 228;BA.debugLine="todoBienFLP = False";
Debug.ShouldStop(8);
_todobienflp = tracker.mostCurrent.__c.getField(true,"False");Debug.locals.put("todoBienFLP", _todobienflp);
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e10) {
			BA.rdebugUtils.runVoidMethod("setLastException",tracker.processBA, e10.toString()); BA.debugLineNum = 231;BA.debugLine="LogColor(\"If Not(Tracker.FLP.IsInitialized) -->";
Debug.ShouldStop(64);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330081034",RemoteObject.concat(RemoteObject.createImmutable("If Not(Tracker.FLP.IsInitialized) --> "),tracker.mostCurrent.__c.runMethod(false,"LastException",tracker.processBA)),tracker.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 233;BA.debugLine="Try";
Debug.ShouldStop(256);
try { BA.debugLineNum = 234;BA.debugLine="If FLP.IsInitialized Then";
Debug.ShouldStop(512);
if (tracker._flp.runMethod(true,"IsInitialized").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 235;BA.debugLine="Try";
Debug.ShouldStop(1024);
try { BA.debugLineNum = 236;BA.debugLine="If Not(FLP.IsConnected) Then";
Debug.ShouldStop(2048);
if (tracker.mostCurrent.__c.runMethod(true,"Not",(Object)(tracker._flp.runMethod(true,"IsConnected"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 237;BA.debugLine="Subs.log2DB(\"revisaFLP: No esta conectado ...";
Debug.ShouldStop(4096);
tracker.mostCurrent._subs.runVoidMethod ("_log2db" /*RemoteObject*/ ,tracker.processBA,(Object)(RemoteObject.createImmutable("revisaFLP: No esta conectado ... 'Reconectando FLP'")));
 BA.debugLineNum = 239;BA.debugLine="StartFLP";
Debug.ShouldStop(16384);
_startflp();
 BA.debugLineNum = 240;BA.debugLine="todoBienFLP = False";
Debug.ShouldStop(32768);
_todobienflp = tracker.mostCurrent.__c.getField(true,"False");Debug.locals.put("todoBienFLP", _todobienflp);
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e21) {
			BA.rdebugUtils.runVoidMethod("setLastException",tracker.processBA, e21.toString()); BA.debugLineNum = 243;BA.debugLine="LogColor(\"If Not(Tracker.FLP.IsConnected) -->";
Debug.ShouldStop(262144);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330081046",RemoteObject.concat(RemoteObject.createImmutable("If Not(Tracker.FLP.IsConnected) --> "),tracker.mostCurrent.__c.runMethod(false,"LastException",tracker.processBA)),tracker.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 245;BA.debugLine="Try";
Debug.ShouldStop(1048576);
try { BA.debugLineNum = 246;BA.debugLine="If FLP.IsConnected And _ 					FLP.GetLastKnown";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean(".",tracker._flp.runMethod(true,"IsConnected")) && RemoteObject.solveBoolean(".",tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"IsInitialized")) && RemoteObject.solveBoolean(">",tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"DistanceTo",(Object)((tracker._uugcoords.getObject()))),BA.numberCast(double.class, 500))) { 
 BA.debugLineNum = 249;BA.debugLine="Subs.log2DB(\"revisaFLP: 'No se esta actualiza";
Debug.ShouldStop(16777216);
tracker.mostCurrent._subs.runVoidMethod ("_log2db" /*RemoteObject*/ ,tracker.processBA,(Object)(RemoteObject.createImmutable("revisaFLP: 'No se esta actualizando, lo reiniciamos ...'")));
 BA.debugLineNum = 250;BA.debugLine="StartService(Me)";
Debug.ShouldStop(33554432);
tracker.mostCurrent.__c.runVoidMethod ("StartService",tracker.processBA,(Object)(tracker.getObject()));
 BA.debugLineNum = 251;BA.debugLine="todoBienFLP = False";
Debug.ShouldStop(67108864);
_todobienflp = tracker.mostCurrent.__c.getField(true,"False");Debug.locals.put("todoBienFLP", _todobienflp);
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e30) {
			BA.rdebugUtils.runVoidMethod("setLastException",tracker.processBA, e30.toString()); BA.debugLineNum = 254;BA.debugLine="LogColor(\"If FLP.IsConnectctd and FLP.getLKL.I";
Debug.ShouldStop(536870912);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330081057",RemoteObject.concat(RemoteObject.createImmutable("If FLP.IsConnectctd and FLP.getLKL.IsInitialized --> "),tracker.mostCurrent.__c.runMethod(false,"LastException",tracker.processBA)),tracker.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 };
 BA.debugLineNum = 257;BA.debugLine="If todoBienFLP Then LogColor(\" +++ +++ Sin error";
Debug.ShouldStop(1);
if (_todobienflp.<Boolean>get().booleanValue()) { 
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330081060",BA.ObjectToString(" +++ +++ Sin errores en FLP"),tracker.mostCurrent.__c.getField(false,"Colors").getField(true,"Green"));};
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e35) {
			BA.rdebugUtils.runVoidMethod("setLastException",tracker.processBA, e35.toString()); BA.debugLineNum = 259;BA.debugLine="LogColor(\"If Tracker.FLP.IsInitialized --> \"&Las";
Debug.ShouldStop(4);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330081062",RemoteObject.concat(RemoteObject.createImmutable("If Tracker.FLP.IsInitialized --> "),tracker.mostCurrent.__c.runMethod(false,"LastException",tracker.processBA)),tracker.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 262;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _revisauug() throws Exception{
try {
		Debug.PushSubsStack("revisaUUG (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,266);
if (RapidSub.canDelegate("revisauug")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","revisauug");}
RemoteObject _daa = RemoteObject.createImmutable(0);
 BA.debugLineNum = 266;BA.debugLine="Sub revisaUUG 'ignore";
Debug.ShouldStop(512);
 BA.debugLineNum = 267;BA.debugLine="Try";
Debug.ShouldStop(1024);
try { BA.debugLineNum = 269;BA.debugLine="If FLP.IsInitialized And FLP.IsConnected Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean(".",tracker._flp.runMethod(true,"IsInitialized")) && RemoteObject.solveBoolean(".",tracker._flp.runMethod(true,"IsConnected"))) { 
 BA.debugLineNum = 270;BA.debugLine="Try";
Debug.ShouldStop(8192);
try { BA.debugLineNum = 271;BA.debugLine="If FLP.GetLastKnownLocation.IsInitialized Then";
Debug.ShouldStop(16384);
if (tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"IsInitialized").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 273;BA.debugLine="Dim daa As Int = UUGCoords.DistanceTo(FLP.Get";
Debug.ShouldStop(65536);
_daa = BA.numberCast(int.class, tracker._uugcoords.runMethod(true,"DistanceTo",(Object)((tracker._flp.runMethod(false,"GetLastKnownLocation").getObject()))));Debug.locals.put("daa", _daa);Debug.locals.put("daa", _daa);
 BA.debugLineNum = 274;BA.debugLine="If Starter.Logger Then LogColor($\"**** UUC \"$";
Debug.ShouldStop(131072);
if (tracker.mostCurrent._starter._logger /*RemoteObject*/ .<Boolean>get().booleanValue()) { 
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330146568",(RemoteObject.concat(RemoteObject.createImmutable("**** UUC \""),tracker.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((tracker.mostCurrent._subs.runMethod(true,"_fechakmt" /*RemoteObject*/ ,tracker.processBA,(Object)(BA.NumberToString(tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getTime"))))))),RemoteObject.createImmutable("|"),tracker.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.2")),(Object)((tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getAccuracy")))),RemoteObject.createImmutable("|"),tracker.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.8")),(Object)((tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getLatitude")))),RemoteObject.createImmutable("|"),tracker.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.8")),(Object)((tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getLongitude")))),RemoteObject.createImmutable("|"),tracker.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("0.2")),(Object)((tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getSpeed")))),RemoteObject.createImmutable("|"))),tracker.mostCurrent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 255)),(Object)(BA.numberCast(int.class, 112)),(Object)(BA.numberCast(int.class, 35))));};
 BA.debugLineNum = 275;BA.debugLine="If daa > 40 And FLP.GetLastKnownLocation.Accu";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean(">",_daa,BA.numberCast(double.class, 40)) && RemoteObject.solveBoolean("<",tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getAccuracy"),BA.numberCast(double.class, 35))) { 
 BA.debugLineNum = 276;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
Debug.ShouldStop(524288);
tracker.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,tracker.processBA).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO RUTA_GPS(fecha, lat, lon) VALUES (?,?,?)")),(Object)(tracker.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {3},new Object[] {(tracker.mostCurrent._subs.runMethod(true,"_fechakmt" /*RemoteObject*/ ,tracker.processBA,(Object)(BA.NumberToString(tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getTime"))))),(tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getLatitude")),(tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getLongitude"))})))));
 BA.debugLineNum = 277;BA.debugLine="If Starter.Logger Then Log(\"++++ Distancia a";
Debug.ShouldStop(1048576);
if (tracker.mostCurrent._starter._logger /*RemoteObject*/ .<Boolean>get().booleanValue()) { 
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330146571",RemoteObject.concat(RemoteObject.createImmutable("++++ Distancia a anterior="),_daa,RemoteObject.createImmutable("|"),RemoteObject.createImmutable("Precision="),tracker._flp.runMethod(false,"GetLastKnownLocation").runMethod(true,"getAccuracy")),0);};
 };
 BA.debugLineNum = 279;BA.debugLine="UUGCoords = FLP.GetLastKnownLocation";
Debug.ShouldStop(4194304);
tracker._uugcoords = tracker._flp.runMethod(false,"GetLastKnownLocation");
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e14) {
			BA.rdebugUtils.runVoidMethod("setLastException",tracker.processBA, e14.toString()); BA.debugLineNum = 282;BA.debugLine="LogColor(\"FLP.GetLastKnownLocation.IsInitializ";
Debug.ShouldStop(33554432);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330146576",RemoteObject.concat(RemoteObject.createImmutable("FLP.GetLastKnownLocation.IsInitialized --> "),tracker.mostCurrent.__c.runMethod(false,"LastException",tracker.processBA)),tracker.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 }else {
 BA.debugLineNum = 285;BA.debugLine="Log(\"StartFLP\")";
Debug.ShouldStop(268435456);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330146579",RemoteObject.createImmutable("StartFLP"),0);
 BA.debugLineNum = 286;BA.debugLine="StartFLP";
Debug.ShouldStop(536870912);
_startflp();
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e21) {
			BA.rdebugUtils.runVoidMethod("setLastException",tracker.processBA, e21.toString()); BA.debugLineNum = 289;BA.debugLine="LogColor(\"If FLP.IsInitialized --> \"&LastExcepti";
Debug.ShouldStop(1);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","330146583",RemoteObject.concat(RemoteObject.createImmutable("If FLP.IsInitialized --> "),tracker.mostCurrent.__c.runMethod(false,"LastException",tracker.processBA)),tracker.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
 };
 BA.debugLineNum = 291;BA.debugLine="End Sub";
Debug.ShouldStop(4);
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 (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,41);
if (RapidSub.canDelegate("service_create")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","service_create");}
 BA.debugLineNum = 41;BA.debugLine="Sub Service_Create";
Debug.ShouldStop(256);
 BA.debugLineNum = 42;BA.debugLine="Service.AutomaticForegroundMode = Service.AUTOMAT";
Debug.ShouldStop(512);
tracker.mostCurrent._service.setField ("AutomaticForegroundMode",tracker.mostCurrent._service.getField(true,"AUTOMATIC_FOREGROUND_NEVER"));
 BA.debugLineNum = 44;BA.debugLine="FLP.Initialize(\"flp\")";
Debug.ShouldStop(2048);
tracker._flp.runVoidMethod ("Initialize",tracker.processBA,(Object)(RemoteObject.createImmutable("flp")));
 BA.debugLineNum = 45;BA.debugLine="FLP.Connect";
Debug.ShouldStop(4096);
tracker._flp.runVoidMethod ("Connect");
 BA.debugLineNum = 46;BA.debugLine="lock.PartialLock";
Debug.ShouldStop(8192);
tracker._lock.runVoidMethod ("PartialLock",tracker.processBA);
 BA.debugLineNum = 47;BA.debugLine="StartFLP";
Debug.ShouldStop(16384);
_startflp();
 BA.debugLineNum = 48;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
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 (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,202);
if (RapidSub.canDelegate("service_destroy")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","service_destroy");}
 BA.debugLineNum = 202;BA.debugLine="Sub Service_Destroy";
Debug.ShouldStop(512);
 BA.debugLineNum = 203;BA.debugLine="If Tracking Then";
Debug.ShouldStop(1024);
if (tracker._tracking.<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 204;BA.debugLine="StopFLP";
Debug.ShouldStop(2048);
_stopflp();
 };
 BA.debugLineNum = 206;BA.debugLine="Tracking = False";
Debug.ShouldStop(8192);
tracker._tracking = tracker.mostCurrent.__c.getField(true,"False");
 BA.debugLineNum = 207;BA.debugLine="lock.ReleasePartialLock";
Debug.ShouldStop(16384);
tracker._lock.runVoidMethod ("ReleasePartialLock");
 BA.debugLineNum = 208;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
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 (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,59);
if (RapidSub.canDelegate("service_start")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","service_start", _startingintent);}
Debug.locals.put("StartingIntent", _startingintent);
 BA.debugLineNum = 59;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 61;BA.debugLine="Service.StopAutomaticForeground";
Debug.ShouldStop(268435456);
tracker.mostCurrent._service.runVoidMethod ("StopAutomaticForeground");
 BA.debugLineNum = 62;BA.debugLine="Service.StartForeground(nid, CreateNotification(\"";
Debug.ShouldStop(536870912);
tracker.mostCurrent._service.runVoidMethod ("StartForeground",(Object)(tracker._nid),(Object)((_createnotification(RemoteObject.createImmutable("...")).getObject())));
 BA.debugLineNum = 63;BA.debugLine="Track";
Debug.ShouldStop(1073741824);
_track();
 BA.debugLineNum = 64;BA.debugLine="StartServiceAt(Me, DateTime.Now + 5 * DateTime.Ti";
Debug.ShouldStop(-2147483648);
tracker.mostCurrent.__c.runVoidMethod ("StartServiceAt",tracker.processBA,(Object)(tracker.getObject()),(Object)(RemoteObject.solve(new RemoteObject[] {tracker.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"),RemoteObject.createImmutable(5),tracker.mostCurrent.__c.getField(false,"DateTime").getField(true,"TicksPerMinute")}, "+*",1, 2)),(Object)(tracker.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 65;BA.debugLine="FLP.GetLastKnownLocation.Initialize";
Debug.ShouldStop(1);
tracker._flp.runMethod(false,"GetLastKnownLocation").runVoidMethod ("Initialize");
 BA.debugLineNum = 66;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static void  _startflp() throws Exception{
try {
		Debug.PushSubsStack("StartFLP (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,84);
if (RapidSub.canDelegate("startflp")) { keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","startflp"); return;}
ResumableSub_StartFLP rsub = new ResumableSub_StartFLP(null);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_StartFLP extends BA.ResumableSub {
public ResumableSub_StartFLP(keymon.lat.medicomed.tracker parent) {
this.parent = parent;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
keymon.lat.medicomed.tracker parent;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("StartFLP (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,84);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
 BA.debugLineNum = 86;BA.debugLine="Do While FLP.IsConnected = False";
Debug.ShouldStop(2097152);
if (true) break;

case 1:
//do while
this.state = 4;
while (RemoteObject.solveBoolean("=",parent._flp.runMethod(true,"IsConnected"),parent.mostCurrent.__c.getField(true,"False"))) {
this.state = 3;
if (true) break;
}
if (true) break;

case 3:
//C
this.state = 1;
 BA.debugLineNum = 87;BA.debugLine="Sleep(500)";
Debug.ShouldStop(4194304);
parent.mostCurrent.__c.runVoidMethod ("Sleep",tracker.processBA,anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "tracker", "startflp"),BA.numberCast(int.class, 500));
this.state = 5;
return;
case 5:
//C
this.state = 1;
;
 if (true) break;

case 4:
//C
this.state = -1;
;
 BA.debugLineNum = 92;BA.debugLine="FLP.RequestLocationUpdates(CreateLocationRequest)";
Debug.ShouldStop(134217728);
parent._flp.runVoidMethod ("RequestLocationUpdates",(Object)((_createlocationrequest().getObject())));
 BA.debugLineNum = 95;BA.debugLine="flpStarted = True";
Debug.ShouldStop(1073741824);
parent._flpstarted = parent.mostCurrent.__c.getField(true,"True");
 BA.debugLineNum = 97;BA.debugLine="End Sub";
Debug.ShouldStop(1);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static void  _startflpsmall() throws Exception{
try {
		Debug.PushSubsStack("StartFLPSmall (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,99);
if (RapidSub.canDelegate("startflpsmall")) { keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","startflpsmall"); return;}
ResumableSub_StartFLPSmall rsub = new ResumableSub_StartFLPSmall(null);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_StartFLPSmall extends BA.ResumableSub {
public ResumableSub_StartFLPSmall(keymon.lat.medicomed.tracker parent) {
this.parent = parent;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
keymon.lat.medicomed.tracker parent;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("StartFLPSmall (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,99);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
 BA.debugLineNum = 101;BA.debugLine="Do While FLP.IsConnected = False";
Debug.ShouldStop(16);
if (true) break;

case 1:
//do while
this.state = 4;
while (RemoteObject.solveBoolean("=",parent._flp.runMethod(true,"IsConnected"),parent.mostCurrent.__c.getField(true,"False"))) {
this.state = 3;
if (true) break;
}
if (true) break;

case 3:
//C
this.state = 1;
 BA.debugLineNum = 102;BA.debugLine="Sleep(500)";
Debug.ShouldStop(32);
parent.mostCurrent.__c.runVoidMethod ("Sleep",tracker.processBA,anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "tracker", "startflpsmall"),BA.numberCast(int.class, 500));
this.state = 5;
return;
case 5:
//C
this.state = 1;
;
 BA.debugLineNum = 103;BA.debugLine="Log(\"sleeping\")";
Debug.ShouldStop(64);
parent.mostCurrent.__c.runVoidMethod ("LogImpl","329491204",RemoteObject.createImmutable("sleeping"),0);
 if (true) break;

case 4:
//C
this.state = -1;
;
 BA.debugLineNum = 105;BA.debugLine="dameUltimaUbicacionConocida 'Regresamos ultima ub";
Debug.ShouldStop(256);
_dameultimaubicacionconocida();
 BA.debugLineNum = 106;BA.debugLine="FLP.RequestLocationUpdates(CreateLocationRequestS";
Debug.ShouldStop(512);
parent._flp.runVoidMethod ("RequestLocationUpdates",(Object)((_createlocationrequestsmalld().getObject())));
 BA.debugLineNum = 109;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _stopflp() throws Exception{
try {
		Debug.PushSubsStack("StopFLP (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,146);
if (RapidSub.canDelegate("stopflp")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","stopflp");}
 BA.debugLineNum = 146;BA.debugLine="Public Sub StopFLP";
Debug.ShouldStop(131072);
 BA.debugLineNum = 148;BA.debugLine="If flpStarted Then";
Debug.ShouldStop(524288);
if (tracker._flpstarted.<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 149;BA.debugLine="FLP.RemoveLocationUpdates  'Eliminamos todas las";
Debug.ShouldStop(1048576);
tracker._flp.runVoidMethod ("RemoveLocationUpdates");
 BA.debugLineNum = 150;BA.debugLine="flpStarted = False";
Debug.ShouldStop(2097152);
tracker._flpstarted = tracker.mostCurrent.__c.getField(true,"False");
 };
 BA.debugLineNum = 152;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _track() throws Exception{
try {
		Debug.PushSubsStack("Track (tracker) ","tracker",22,tracker.processBA,tracker.mostCurrent,68);
if (RapidSub.canDelegate("track")) { return keymon.lat.medicomed.tracker.remoteMe.runUserSub(false, "tracker","track");}
 BA.debugLineNum = 68;BA.debugLine="Public Sub Track";
Debug.ShouldStop(8);
 BA.debugLineNum = 70;BA.debugLine="If Not(FLP.IsInitialized) Then FLP.Initialize(\"fl";
Debug.ShouldStop(32);
if (tracker.mostCurrent.__c.runMethod(true,"Not",(Object)(tracker._flp.runMethod(true,"IsInitialized"))).<Boolean>get().booleanValue()) { 
tracker._flp.runVoidMethod ("Initialize",tracker.processBA,(Object)(RemoteObject.createImmutable("flp")));};
 BA.debugLineNum = 71;BA.debugLine="If Not(FLP.IsConnected) Then FLP.Connect";
Debug.ShouldStop(64);
if (tracker.mostCurrent.__c.runMethod(true,"Not",(Object)(tracker._flp.runMethod(true,"IsConnected"))).<Boolean>get().booleanValue()) { 
tracker._flp.runVoidMethod ("Connect");};
 BA.debugLineNum = 72;BA.debugLine="If Tracking And actualLR.IsInitialized Then";
Debug.ShouldStop(128);
if (RemoteObject.solveBoolean(".",tracker._tracking) && RemoteObject.solveBoolean(".",tracker._actuallr.runMethod(true,"IsInitialized"))) { 
 BA.debugLineNum = 74;BA.debugLine="Return 'Si ya estamos \"rastreando\" no hacemos na";
Debug.ShouldStop(512);
if (true) return RemoteObject.createImmutable("");
 };
 BA.debugLineNum = 76;BA.debugLine="If Starter.rp.Check(Starter.rp.PERMISSION_ACCESS_";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean("=",tracker.mostCurrent._starter._rp /*RemoteObject*/ .runMethod(true,"Check",(Object)(tracker.mostCurrent._starter._rp /*RemoteObject*/ .getField(true,"PERMISSION_ACCESS_FINE_LOCATION"))),tracker.mostCurrent.__c.getField(true,"False"))) { 
 BA.debugLineNum = 77;BA.debugLine="Log(\"No permission\")";
Debug.ShouldStop(4096);
tracker.mostCurrent.__c.runVoidMethod ("LogImpl","329360137",RemoteObject.createImmutable("No permission"),0);
 BA.debugLineNum = 78;BA.debugLine="Return";
Debug.ShouldStop(8192);
if (true) return RemoteObject.createImmutable("");
 };
 BA.debugLineNum = 80;BA.debugLine="StartFLP 'Iniciamos FusedLocationProvider";
Debug.ShouldStop(32768);
_startflp();
 BA.debugLineNum = 81;BA.debugLine="Tracking = True";
Debug.ShouldStop(65536);
tracker._tracking = tracker.mostCurrent.__c.getField(true,"True");
 BA.debugLineNum = 82;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}