package reparto_mazapa.keymon.lat;

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

public class firebasemessaging_subs_0 {


public static RemoteObject  _borragpshist() throws Exception{
try {
		Debug.PushSubsStack("borraGPSHist (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,218);
if (RapidSub.canDelegate("borragpshist")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","borragpshist");}
 BA.debugLineNum = 218;BA.debugLine="Sub borraGPSHist";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 220;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _borramosarchivogps() throws Exception{
try {
		Debug.PushSubsStack("borramosArchivoGPS (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,167);
if (RapidSub.canDelegate("borramosarchivogps")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","borramosarchivogps");}
RemoteObject _out = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
RemoteObject _s = RemoteObject.createImmutable("");
RemoteObject _t = null;
 BA.debugLineNum = 167;BA.debugLine="Sub borramosArchivoGPS";
Debug.ShouldStop(64);
 BA.debugLineNum = 168;BA.debugLine="Dim out As OutputStream = File.OpenOutput(File.Di";
Debug.ShouldStop(128);
_out = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
_out = firebasemessaging.mostCurrent.__c.getField(false,"File").runMethod(false,"OpenOutput",(Object)(firebasemessaging.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirRootExternal")),(Object)(BA.ObjectToString("gps.txt")),(Object)(firebasemessaging.mostCurrent.__c.getField(true,"False")));Debug.locals.put("out", _out);Debug.locals.put("out", _out);
 BA.debugLineNum = 169;BA.debugLine="Dim s As String = \"\"";
Debug.ShouldStop(256);
_s = BA.ObjectToString("");Debug.locals.put("s", _s);Debug.locals.put("s", _s);
 BA.debugLineNum = 170;BA.debugLine="Dim t() As Byte = s.GetBytes(\"UTF-8\")";
Debug.ShouldStop(512);
_t = _s.runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF-8")));Debug.locals.put("t", _t);Debug.locals.put("t", _t);
 BA.debugLineNum = 171;BA.debugLine="out.WriteBytes(t, 0, t.Length)";
Debug.ShouldStop(1024);
_out.runVoidMethod ("WriteBytes",(Object)(_t),(Object)(BA.numberCast(int.class, 0)),(Object)(_t.getField(true,"length")));
 BA.debugLineNum = 172;BA.debugLine="out.Close";
Debug.ShouldStop(2048);
_out.runVoidMethod ("Close");
 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  _compress(RemoteObject _str) throws Exception{
try {
		Debug.PushSubsStack("compress (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,179);
if (RapidSub.canDelegate("compress")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","compress", _str);}
RemoteObject _su = RemoteObject.declareNull("anywheresoftware.b4a.objects.StringUtils");
RemoteObject _compressed = null;
RemoteObject _base64 = RemoteObject.createImmutable("");
Debug.locals.put("str", _str);
 BA.debugLineNum = 179;BA.debugLine="Sub compress(str As String) As String";
Debug.ShouldStop(262144);
 BA.debugLineNum = 181;BA.debugLine="Private su As StringUtils";
Debug.ShouldStop(1048576);
_su = RemoteObject.createNew ("anywheresoftware.b4a.objects.StringUtils");Debug.locals.put("su", _su);
 BA.debugLineNum = 182;BA.debugLine="Dim compressed() As Byte = GZip.compress(str)";
Debug.ShouldStop(2097152);
_compressed = firebasemessaging._gzip.runMethod(false,"compress",(Object)(_str));Debug.locals.put("compressed", _compressed);Debug.locals.put("compressed", _compressed);
 BA.debugLineNum = 183;BA.debugLine="Log($\"CompressedBytesLength: ${compressed.Length}";
Debug.ShouldStop(4194304);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369992452",(RemoteObject.concat(RemoteObject.createImmutable("CompressedBytesLength: "),firebasemessaging.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_compressed.getField(true,"length")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 184;BA.debugLine="Dim base64 As String = su.EncodeBase64(compressed";
Debug.ShouldStop(8388608);
_base64 = _su.runMethod(true,"EncodeBase64",(Object)(_compressed));Debug.locals.put("base64", _base64);Debug.locals.put("base64", _base64);
 BA.debugLineNum = 185;BA.debugLine="Log($\"CompressedBytes converted to base64 Length:";
Debug.ShouldStop(16777216);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369992454",(RemoteObject.concat(RemoteObject.createImmutable("CompressedBytes converted to base64 Length: "),firebasemessaging.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_base64.runMethod(true,"length")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 186;BA.debugLine="Log($\"CompressedBytes converted to base64: ${base";
Debug.ShouldStop(33554432);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369992455",(RemoteObject.concat(RemoteObject.createImmutable("CompressedBytes converted to base64: "),firebasemessaging.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_base64))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 187;BA.debugLine="Return base64";
Debug.ShouldStop(67108864);
if (true) return _base64;
 BA.debugLineNum = 188;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _dameruta() throws Exception{
try {
		Debug.PushSubsStack("dameRuta (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,202);
if (RapidSub.canDelegate("dameruta")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","dameruta");}
 BA.debugLineNum = 202;BA.debugLine="Sub dameRuta As String";
Debug.ShouldStop(512);
 BA.debugLineNum = 216;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _decompress(RemoteObject _base64) throws Exception{
try {
		Debug.PushSubsStack("decompress (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,190);
if (RapidSub.canDelegate("decompress")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","decompress", _base64);}
RemoteObject _su = RemoteObject.declareNull("anywheresoftware.b4a.objects.StringUtils");
RemoteObject _decompressedbytes = null;
RemoteObject _bc = RemoteObject.declareNull("anywheresoftware.b4a.agraham.byteconverter.ByteConverter");
RemoteObject _uncompressed = RemoteObject.createImmutable("");
Debug.locals.put("base64", _base64);
 BA.debugLineNum = 190;BA.debugLine="Sub decompress(base64 As String) As String 'ignore";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 192;BA.debugLine="Private su As StringUtils";
Debug.ShouldStop(-2147483648);
_su = RemoteObject.createNew ("anywheresoftware.b4a.objects.StringUtils");Debug.locals.put("su", _su);
 BA.debugLineNum = 193;BA.debugLine="Dim decompressedbytes() As Byte = su.DecodeBase64";
Debug.ShouldStop(1);
_decompressedbytes = _su.runMethod(false,"DecodeBase64",(Object)(_base64));Debug.locals.put("decompressedbytes", _decompressedbytes);Debug.locals.put("decompressedbytes", _decompressedbytes);
 BA.debugLineNum = 194;BA.debugLine="Log($\"decompressedbytesLength: ${decompressedbyte";
Debug.ShouldStop(2);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","370057988",(RemoteObject.concat(RemoteObject.createImmutable("decompressedbytesLength: "),firebasemessaging.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_decompressedbytes.getField(true,"length")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 195;BA.debugLine="Dim bc As ByteConverter";
Debug.ShouldStop(4);
_bc = RemoteObject.createNew ("anywheresoftware.b4a.agraham.byteconverter.ByteConverter");Debug.locals.put("bc", _bc);
 BA.debugLineNum = 196;BA.debugLine="Dim uncompressed As String = bc.StringFromBytes(d";
Debug.ShouldStop(8);
_uncompressed = _bc.runMethod(true,"StringFromBytes",(Object)(_decompressedbytes),(Object)(RemoteObject.createImmutable("UTF8")));Debug.locals.put("uncompressed", _uncompressed);Debug.locals.put("uncompressed", _uncompressed);
 BA.debugLineNum = 197;BA.debugLine="Log($\"uncompressedLength: ${uncompressed.Length}\"";
Debug.ShouldStop(16);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","370057991",(RemoteObject.concat(RemoteObject.createImmutable("uncompressedLength: "),firebasemessaging.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_uncompressed.runMethod(true,"length")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 198;BA.debugLine="Log($\"Decompressed String = ${uncompressed}\"$)";
Debug.ShouldStop(32);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","370057992",(RemoteObject.concat(RemoteObject.createImmutable("Decompressed String = "),firebasemessaging.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_uncompressed))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 199;BA.debugLine="Return uncompressed";
Debug.ShouldStop(64);
if (true) return _uncompressed;
 BA.debugLineNum = 200;BA.debugLine="End Sub";
Debug.ShouldStop(128);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _fm_messagearrived(RemoteObject _message) throws Exception{
try {
		Debug.PushSubsStack("fm_MessageArrived (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,72);
if (RapidSub.canDelegate("fm_messagearrived")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","fm_messagearrived", _message);}
RemoteObject _tipos = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _params = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _rutagpscmp = RemoteObject.createImmutable("");
Debug.locals.put("Message", _message);
 BA.debugLineNum = 72;BA.debugLine="Sub fm_MessageArrived (Message As RemoteMessage)";
Debug.ShouldStop(128);
 BA.debugLineNum = 73;BA.debugLine="Log(\"Message arrived\")";
Debug.ShouldStop(256);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533697",RemoteObject.createImmutable("Message arrived"),0);
 BA.debugLineNum = 74;BA.debugLine="Log($\"Message data: ${Message.GetData}\"$)";
Debug.ShouldStop(512);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533698",(RemoteObject.concat(RemoteObject.createImmutable("Message data: "),firebasemessaging.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_message.runMethod(false,"GetData").getObject()))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 76;BA.debugLine="If Message.GetData.ContainsKey(\"t\") Then";
Debug.ShouldStop(2048);
if (_message.runMethod(false,"GetData").runMethod(true,"ContainsKey",(Object)((RemoteObject.createImmutable("t")))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 77;BA.debugLine="Dim tipos As List = Regex.Split(\",\",Message.GetD";
Debug.ShouldStop(4096);
_tipos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_tipos = firebasemessaging.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(firebasemessaging.mostCurrent.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString(",")),(Object)(BA.ObjectToString(_message.runMethod(false,"GetData").runMethod(false,"Get",(Object)((RemoteObject.createImmutable("t")))))))));Debug.locals.put("tipos", _tipos);Debug.locals.put("tipos", _tipos);
 BA.debugLineNum = 78;BA.debugLine="If tipos.IndexOf(\"pu\") <> -1 Or tipos.IndexOf(\"a";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean("!",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("pu")))),BA.numberCast(double.class, -(double) (0 + 1))) || RemoteObject.solveBoolean("!",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("au")))),BA.numberCast(double.class, -(double) (0 + 1)))) { 
 BA.debugLineNum = 79;BA.debugLine="Log(\"Es una peticion de ubicacion\")";
Debug.ShouldStop(16384);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533703",RemoteObject.createImmutable("Es una peticion de ubicacion"),0);
 BA.debugLineNum = 80;BA.debugLine="locRequest=\"Activa\"";
Debug.ShouldStop(32768);
firebasemessaging._locrequest = BA.ObjectToString("Activa");
 BA.debugLineNum = 81;BA.debugLine="Log(\"Llamamos StartFLPSmall\")";
Debug.ShouldStop(65536);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533705",RemoteObject.createImmutable("Llamamos StartFLPSmall"),0);
 BA.debugLineNum = 82;BA.debugLine="CallSubDelayed(Tracker, \"StartFLPSmall\")";
Debug.ShouldStop(131072);
firebasemessaging.mostCurrent.__c.runVoidMethod ("CallSubDelayed",firebasemessaging.processBA,(Object)((firebasemessaging.mostCurrent._tracker.getObject())),(Object)(RemoteObject.createImmutable("StartFLPSmall")));
 BA.debugLineNum = 83;BA.debugLine="CallSubDelayed(Tracker, \"StartFLP\")";
Debug.ShouldStop(262144);
firebasemessaging.mostCurrent.__c.runVoidMethod ("CallSubDelayed",firebasemessaging.processBA,(Object)((firebasemessaging.mostCurrent._tracker.getObject())),(Object)(RemoteObject.createImmutable("StartFLP")));
 };
 BA.debugLineNum = 85;BA.debugLine="If tipos.IndexOf(\"au\") <> -1 Then 'Si es una act";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean("!",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("au")))),BA.numberCast(double.class, -(double) (0 + 1)))) { 
 BA.debugLineNum = 86;BA.debugLine="au = 1";
Debug.ShouldStop(2097152);
firebasemessaging._au = BA.NumberToString(1);
 };
 BA.debugLineNum = 88;BA.debugLine="If tipos.IndexOf(\"ping\") <> -1 Then 'Si es un pi";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("!",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("ping")))),BA.numberCast(double.class, -(double) (0 + 1)))) { 
 BA.debugLineNum = 89;BA.debugLine="Log(\"Es un ping\")";
Debug.ShouldStop(16777216);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533713",RemoteObject.createImmutable("Es un ping"),0);
 BA.debugLineNum = 90;BA.debugLine="Log(\"Mandamos pong\")";
Debug.ShouldStop(33554432);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533714",RemoteObject.createImmutable("Mandamos pong"),0);
 BA.debugLineNum = 91;BA.debugLine="Dim params As Map = CreateMap(\"topic\":Sprvsr,\"t";
Debug.ShouldStop(67108864);
_params = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_params = firebasemessaging.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("topic")),(firebasemessaging._sprvsr),RemoteObject.createImmutable(("title")),RemoteObject.createImmutable(("pong")),RemoteObject.createImmutable(("body")),(RemoteObject.concat(firebasemessaging.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,firebasemessaging.processBA).getField(true,"_usuario" /*RemoteObject*/ ),RemoteObject.createImmutable(" - Recibi mensaje "),_message.runMethod(false,"GetData").runMethod(false,"Get",(Object)((RemoteObject.createImmutable("title")))))),RemoteObject.createImmutable(("t")),(RemoteObject.createImmutable("pong"))}));Debug.locals.put("params", _params);Debug.locals.put("params", _params);
 BA.debugLineNum = 92;BA.debugLine="SendMessage(params)";
Debug.ShouldStop(134217728);
_sendmessage(_params);
 };
 BA.debugLineNum = 94;BA.debugLine="If tipos.IndexOf(\"bgps\") <> -1 Then 'Si es una i";
Debug.ShouldStop(536870912);
if (RemoteObject.solveBoolean("!",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("bgps")))),BA.numberCast(double.class, -(double) (0 + 1)))) { 
 BA.debugLineNum = 95;BA.debugLine="Log(\"Es una instruccion de borrar archivo gps\")";
Debug.ShouldStop(1073741824);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533719",RemoteObject.createImmutable("Es una instruccion de borrar archivo gps"),0);
 BA.debugLineNum = 96;BA.debugLine="Log(\"Borramos archivo gps\")";
Debug.ShouldStop(-2147483648);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533720",RemoteObject.createImmutable("Borramos archivo gps"),0);
 BA.debugLineNum = 97;BA.debugLine="borramosArchivoGPS";
Debug.ShouldStop(1);
_borramosarchivogps();
 };
 BA.debugLineNum = 99;BA.debugLine="If tipos.IndexOf(\"dr\") <> -1 Then 'Si es una pet";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean("!",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("dr")))),BA.numberCast(double.class, -(double) (0 + 1)))) { 
 BA.debugLineNum = 100;BA.debugLine="Log(\"Es una peticion de Ruta GPS\")";
Debug.ShouldStop(8);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533724",RemoteObject.createImmutable("Es una peticion de Ruta GPS"),0);
 BA.debugLineNum = 101;BA.debugLine="Dim rutaGpsCmp As String = dameRuta";
Debug.ShouldStop(16);
_rutagpscmp = _dameruta();Debug.locals.put("rutaGpsCmp", _rutagpscmp);Debug.locals.put("rutaGpsCmp", _rutagpscmp);
 BA.debugLineNum = 102;BA.debugLine="Dim params As Map = CreateMap(\"topic\":Sprvsr,\"t";
Debug.ShouldStop(32);
_params = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_params = firebasemessaging.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("topic")),(firebasemessaging._sprvsr),RemoteObject.createImmutable(("title")),RemoteObject.createImmutable(("ruta")),RemoteObject.createImmutable(("body")),(RemoteObject.concat(firebasemessaging.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,firebasemessaging.processBA).getField(true,"_usuario" /*RemoteObject*/ ),RemoteObject.createImmutable(" - Recibi mensaje "),_message.runMethod(false,"GetData").runMethod(false,"Get",(Object)((RemoteObject.createImmutable("title")))))),RemoteObject.createImmutable(("t")),RemoteObject.createImmutable(("ruta")),RemoteObject.createImmutable(("r")),(_rutagpscmp)}));Debug.locals.put("params", _params);Debug.locals.put("params", _params);
 BA.debugLineNum = 103;BA.debugLine="SendMessage(params)";
Debug.ShouldStop(64);
_sendmessage(_params);
 };
 BA.debugLineNum = 105;BA.debugLine="If tipos.IndexOf(\"bgps2\") <> -1 Then 'Si es una";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean("!",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("bgps2")))),BA.numberCast(double.class, -(double) (0 + 1)))) { 
 BA.debugLineNum = 106;BA.debugLine="Log(\"Es una instruccion de borrar BD gps\")";
Debug.ShouldStop(512);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533730",RemoteObject.createImmutable("Es una instruccion de borrar BD gps"),0);
 BA.debugLineNum = 107;BA.debugLine="Log(\"Borramos BD gps\")";
Debug.ShouldStop(1024);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533731",RemoteObject.createImmutable("Borramos BD gps"),0);
 BA.debugLineNum = 108;BA.debugLine="borraGPSHist";
Debug.ShouldStop(2048);
_borragpshist();
 };
 BA.debugLineNum = 110;BA.debugLine="If tipos.IndexOf(\"pu\") = -1 And tipos.IndexOf(\"a";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean("=",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("pu")))),BA.numberCast(double.class, -(double) (0 + 1))) && RemoteObject.solveBoolean("=",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("au")))),BA.numberCast(double.class, -(double) (0 + 1))) && RemoteObject.solveBoolean("=",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("ping")))),BA.numberCast(double.class, -(double) (0 + 1))) && RemoteObject.solveBoolean("=",_tipos.runMethod(true,"IndexOf",(Object)((RemoteObject.createImmutable("dr")))),BA.numberCast(double.class, -(double) (0 + 1)))) { 
 BA.debugLineNum = 111;BA.debugLine="Log(\"No es ping ni solicitud de ubicacion o rut";
Debug.ShouldStop(16384);
firebasemessaging.mostCurrent.__c.runVoidMethod ("LogImpl","369533735",RemoteObject.createImmutable("No es ping ni solicitud de ubicacion o ruta, entonces no hacemos nada"),0);
 };
 };
 BA.debugLineNum = 119;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _guardainfoenarchivo(RemoteObject _coords) throws Exception{
try {
		Debug.PushSubsStack("guardaInfoEnArchivo (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,161);
if (RapidSub.canDelegate("guardainfoenarchivo")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","guardainfoenarchivo", _coords);}
Debug.locals.put("coords", _coords);
 BA.debugLineNum = 161;BA.debugLine="Sub guardaInfoEnArchivo(coords As String) 'ignore";
Debug.ShouldStop(1);
 BA.debugLineNum = 165;BA.debugLine="End Sub";
Debug.ShouldStop(16);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _mandamosloc(RemoteObject _coords) throws Exception{
try {
		Debug.PushSubsStack("mandamosLoc (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,150);
if (RapidSub.canDelegate("mandamosloc")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","mandamosloc", _coords);}
RemoteObject _params = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
Debug.locals.put("coords", _coords);
 BA.debugLineNum = 150;BA.debugLine="Sub mandamosLoc(coords As String)";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 153;BA.debugLine="If locRequest=\"Activa\" Then 'Si hay solicitud de";
Debug.ShouldStop(16777216);
if (RemoteObject.solveBoolean("=",firebasemessaging._locrequest,BA.ObjectToString("Activa"))) { 
 BA.debugLineNum = 154;BA.debugLine="Dim params As Map = CreateMap(\"topic\":Sprvsr,\"ti";
Debug.ShouldStop(33554432);
_params = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_params = firebasemessaging.mostCurrent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("topic")),(firebasemessaging._sprvsr),RemoteObject.createImmutable(("title")),RemoteObject.createImmutable(("ubicacionRecibida")),RemoteObject.createImmutable(("body")),(_coords),RemoteObject.createImmutable(("t")),(RemoteObject.createImmutable("u"))}));Debug.locals.put("params", _params);Debug.locals.put("params", _params);
 BA.debugLineNum = 155;BA.debugLine="SendMessage(params)";
Debug.ShouldStop(67108864);
_sendmessage(_params);
 BA.debugLineNum = 156;BA.debugLine="locRequest=\"Enviada\"";
Debug.ShouldStop(134217728);
firebasemessaging._locrequest = BA.ObjectToString("Enviada");
 BA.debugLineNum = 157;BA.debugLine="CallSubDelayed(Tracker,\"CreateLocationRequest\")";
Debug.ShouldStop(268435456);
firebasemessaging.mostCurrent.__c.runVoidMethod ("CallSubDelayed",firebasemessaging.processBA,(Object)((firebasemessaging.mostCurrent._tracker.getObject())),(Object)(RemoteObject.createImmutable("CreateLocationRequest")));
 };
 BA.debugLineNum = 159;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _pe_batterychanged(RemoteObject _level,RemoteObject _scale,RemoteObject _plugged,RemoteObject _intent) throws Exception{
try {
		Debug.PushSubsStack("pe_BatteryChanged (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,175);
if (RapidSub.canDelegate("pe_batterychanged")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","pe_batterychanged", _level, _scale, _plugged, _intent);}
Debug.locals.put("Level", _level);
Debug.locals.put("Scale", _scale);
Debug.locals.put("Plugged", _plugged);
Debug.locals.put("Intent", _intent);
 BA.debugLineNum = 175;BA.debugLine="Sub pe_BatteryChanged (Level As Int, Scale As Int,";
Debug.ShouldStop(16384);
 BA.debugLineNum = 176;BA.debugLine="B4XPages.MainPage.batt=Level";
Debug.ShouldStop(32768);
firebasemessaging.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,firebasemessaging.processBA).setField ("_batt" /*RemoteObject*/ ,_level);
 BA.debugLineNum = 177;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 32;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 33;BA.debugLine="Private fm As FirebaseMessaging";
firebasemessaging._fm = RemoteObject.createNew ("anywheresoftware.b4a.objects.FirebaseNotificationsService.FirebaseMessageWrapper");
 //BA.debugLineNum = 34;BA.debugLine="Private const API_KEY As String = \"AAAAv1qt3Lk:AP";
firebasemessaging._api_key = BA.ObjectToString("AAAAv1qt3Lk:APA91bECIR-pHn6ul53eYyoVlpPuOo85RO-0zcAgEXwE7vqw8DFSbBtCaCINiqWQAkBBZXxHtQMdpU6B-jHIqgFKVL196UgwHv0Gw6_IgmipfV_NiItjzlH9d2QNpGLp9y_JUKVjUEhP");
 //BA.debugLineNum = 35;BA.debugLine="Dim locRequest As String";
firebasemessaging._locrequest = RemoteObject.createImmutable("");
 //BA.debugLineNum = 37;BA.debugLine="Dim pe As PhoneEvents";
firebasemessaging._pe = RemoteObject.createNew ("anywheresoftware.b4a.phone.PhoneEvents");
 //BA.debugLineNum = 38;BA.debugLine="Dim c As Cursor";
firebasemessaging._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
 //BA.debugLineNum = 39;BA.debugLine="Public GZip As GZipStrings";
firebasemessaging._gzip = RemoteObject.createNew ("de.donmanfred.GZipStringswrapper");
 //BA.debugLineNum = 40;BA.debugLine="Dim Sprvsr As String = \"Sprv-Cedex\" ' El topico a";
firebasemessaging._sprvsr = BA.ObjectToString("Sprv-Cedex");
 //BA.debugLineNum = 41;BA.debugLine="Dim Subscrito As String";
firebasemessaging._subscrito = RemoteObject.createImmutable("");
 //BA.debugLineNum = 42;BA.debugLine="Dim au As String 'ignore";
firebasemessaging._au = RemoteObject.createImmutable("");
 //BA.debugLineNum = 43;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _sendmessage(RemoteObject _params) throws Exception{
try {
		Debug.PushSubsStack("SendMessage (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,125);
if (RapidSub.canDelegate("sendmessage")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","sendmessage", _params);}
Debug.locals.put("params", _params);
 BA.debugLineNum = 125;BA.debugLine="Sub SendMessage(params As Map)";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 148;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
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 (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,45);
if (RapidSub.canDelegate("service_create")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","service_create");}
 BA.debugLineNum = 45;BA.debugLine="Sub Service_Create";
Debug.ShouldStop(4096);
 BA.debugLineNum = 46;BA.debugLine="fm.Initialize(\"fm\") 'Inicializamos FirebaseMessag";
Debug.ShouldStop(8192);
firebasemessaging._fm.runVoidMethod ("Initialize",firebasemessaging.processBA,(Object)(RemoteObject.createImmutable("fm")));
 BA.debugLineNum = 47;BA.debugLine="pe.Initialize(\"pe\") 'Para obtener la bateria";
Debug.ShouldStop(16384);
firebasemessaging._pe.runVoidMethod ("Initialize",firebasemessaging.processBA,(Object)(RemoteObject.createImmutable("pe")));
 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 (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,121);
if (RapidSub.canDelegate("service_destroy")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","service_destroy");}
 BA.debugLineNum = 121;BA.debugLine="Sub Service_Destroy";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 123;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static void  _service_start(RemoteObject _startingintent) throws Exception{
try {
		Debug.PushSubsStack("Service_Start (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,65);
if (RapidSub.canDelegate("service_start")) { reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","service_start", _startingintent); return;}
ResumableSub_Service_Start rsub = new ResumableSub_Service_Start(null,_startingintent);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_Service_Start extends BA.ResumableSub {
public ResumableSub_Service_Start(reparto_mazapa.keymon.lat.firebasemessaging parent,RemoteObject _startingintent) {
this.parent = parent;
this._startingintent = _startingintent;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
reparto_mazapa.keymon.lat.firebasemessaging parent;
RemoteObject _startingintent;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("Service_Start (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,65);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

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

case 0:
//C
this.state = 1;
Debug.locals.put("StartingIntent", _startingintent);
 BA.debugLineNum = 66;BA.debugLine="If StartingIntent.IsInitialized Then fm.HandleInt";
Debug.ShouldStop(2);
if (true) break;

case 1:
//if
this.state = 6;
if (_startingintent.runMethod(true,"IsInitialized").<Boolean>get().booleanValue()) { 
this.state = 3;
;}if (true) break;

case 3:
//C
this.state = 6;
parent._fm.runVoidMethod ("HandleIntent",(Object)((_startingintent.getObject())));
if (true) break;

case 6:
//C
this.state = -1;
;
 BA.debugLineNum = 67;BA.debugLine="Sleep(0)";
Debug.ShouldStop(4);
parent.mostCurrent.__c.runVoidMethod ("Sleep",firebasemessaging.processBA,anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "firebasemessaging", "service_start"),BA.numberCast(int.class, 0));
this.state = 7;
return;
case 7:
//C
this.state = -1;
;
 BA.debugLineNum = 68;BA.debugLine="Service.StopAutomaticForeground 'remove if not us";
Debug.ShouldStop(8);
parent.mostCurrent._service.runVoidMethod ("StopAutomaticForeground");
 BA.debugLineNum = 69;BA.debugLine="StartServiceAt(Me, DateTime.Now + 15 * DateTime.T";
Debug.ShouldStop(16);
parent.mostCurrent.__c.runVoidMethod ("StartServiceAt",firebasemessaging.processBA,(Object)(firebasemessaging.getObject()),(Object)(RemoteObject.solve(new RemoteObject[] {parent.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"),RemoteObject.createImmutable(15),parent.mostCurrent.__c.getField(false,"DateTime").getField(true,"TicksPerMinute")}, "+*",1, 2)),(Object)(parent.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 70;BA.debugLine="End Sub";
Debug.ShouldStop(32);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _subscribetotopics() throws Exception{
try {
		Debug.PushSubsStack("SubscribeToTopics (firebasemessaging) ","firebasemessaging",27,firebasemessaging.processBA,firebasemessaging.mostCurrent,50);
if (RapidSub.canDelegate("subscribetotopics")) { return reparto_mazapa.keymon.lat.firebasemessaging.remoteMe.runUserSub(false, "firebasemessaging","subscribetotopics");}
 BA.debugLineNum = 50;BA.debugLine="Public Sub SubscribeToTopics";
Debug.ShouldStop(131072);
 BA.debugLineNum = 52;BA.debugLine="fm.SubscribeToTopic(\"Trckr\") 'Tracker Global";
Debug.ShouldStop(524288);
firebasemessaging._fm.runVoidMethod ("SubscribeToTopic",(Object)(RemoteObject.createImmutable("Trckr")));
 BA.debugLineNum = 54;BA.debugLine="fm.SubscribeToTopic(\"Trckr-Cedex\") 'Topico de Gun";
Debug.ShouldStop(2097152);
firebasemessaging._fm.runVoidMethod ("SubscribeToTopic",(Object)(RemoteObject.createImmutable("Trckr-Cedex")));
 BA.debugLineNum = 55;BA.debugLine="If \"Cdx_\"&B4XPages.MainPage.usuario <> Subscrito";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean("!",RemoteObject.concat(RemoteObject.createImmutable("Cdx_"),firebasemessaging.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,firebasemessaging.processBA).getField(true,"_usuario" /*RemoteObject*/ )),firebasemessaging._subscrito)) { 
 BA.debugLineNum = 56;BA.debugLine="fm.SubscribeToTopic(\"Cdx_\"&B4XPages.MainPage.usu";
Debug.ShouldStop(8388608);
firebasemessaging._fm.runVoidMethod ("SubscribeToTopic",(Object)(RemoteObject.concat(RemoteObject.createImmutable("Cdx_"),firebasemessaging.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,firebasemessaging.processBA).getField(true,"_usuario" /*RemoteObject*/ ))));
 BA.debugLineNum = 57;BA.debugLine="fm.UnsubscribeFromTopic(Subscrito) 'Unsubscribe";
Debug.ShouldStop(16777216);
firebasemessaging._fm.runVoidMethod ("UnsubscribeFromTopic",(Object)(firebasemessaging._subscrito));
 };
 BA.debugLineNum = 60;BA.debugLine="Subscrito = \"Cdx_\"&B4XPages.MainPage.usuario";
Debug.ShouldStop(134217728);
firebasemessaging._subscrito = RemoteObject.concat(RemoteObject.createImmutable("Cdx_"),firebasemessaging.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,firebasemessaging.processBA).getField(true,"_usuario" /*RemoteObject*/ ));
 BA.debugLineNum = 63;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}