package gunav2.keymon.com.mx;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.objects.ServiceHelper;
import anywheresoftware.b4a.debug.*;

public class tracker extends android.app.Service{
	public static class tracker_BR extends android.content.BroadcastReceiver {

		@Override
		public void onReceive(android.content.Context context, android.content.Intent intent) {
            BA.LogInfo("** Receiver (tracker) OnReceive **");
			android.content.Intent in = new android.content.Intent(context, tracker.class);
			if (intent != null)
				in.putExtra("b4a_internal_intent", intent);
            ServiceHelper.StarterHelper.startServiceFromReceiver (context, in, false, BA.class);
		}

	}
    static tracker mostCurrent;
	public static BA processBA;
    private ServiceHelper _service;
    public static Class<?> getObject() {
		return tracker.class;
	}
	@Override
	public void onCreate() {
        super.onCreate();
        mostCurrent = this;
        if (processBA == null) {
		    processBA = new BA(this, null, null, "gunav2.keymon.com.mx", "gunav2.keymon.com.mx.tracker");
            if (BA.isShellModeRuntimeCheck(processBA)) {
                processBA.raiseEvent2(null, true, "SHELL", false);
		    }
            try {
                Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
            processBA.loadHtSubs(this.getClass());
            ServiceHelper.init();
        }
        _service = new ServiceHelper(this);
        processBA.service = this;
        
        if (BA.isShellModeRuntimeCheck(processBA)) {
			processBA.raiseEvent2(null, true, "CREATE", true, "gunav2.keymon.com.mx.tracker", processBA, _service, anywheresoftware.b4a.keywords.Common.Density);
		}
        if (!false && ServiceHelper.StarterHelper.startFromServiceCreate(processBA, false) == false) {
				
		}
		else {
            processBA.setActivityPaused(false);
            BA.LogInfo("*** Service (tracker) Create ***");
            processBA.raiseEvent(null, "service_create");
        }
        processBA.runHook("oncreate", this, null);
        if (false) {
			if (ServiceHelper.StarterHelper.runWaitForLayouts() == false) {
                BA.LogInfo("stopping spontaneous created service");
                stopSelf();
            }
		}
    }
		@Override
	public void onStart(android.content.Intent intent, int startId) {
		onStartCommand(intent, 0, 0);
    }
    @Override
    public int onStartCommand(final android.content.Intent intent, int flags, int startId) {
    	if (ServiceHelper.StarterHelper.onStartCommand(processBA, new Runnable() {
            public void run() {
                handleStart(intent);
            }}))
			;
		else {
			ServiceHelper.StarterHelper.addWaitForLayout (new Runnable() {
				public void run() {
                    processBA.setActivityPaused(false);
                    BA.LogInfo("** Service (tracker) Create **");
                    processBA.raiseEvent(null, "service_create");
					handleStart(intent);
                    ServiceHelper.StarterHelper.removeWaitForLayout();
				}
			});
		}
        processBA.runHook("onstartcommand", this, new Object[] {intent, flags, startId});
		return android.app.Service.START_NOT_STICKY;
    }
    public void onTaskRemoved(android.content.Intent rootIntent) {
        super.onTaskRemoved(rootIntent);
        if (false)
            processBA.raiseEvent(null, "service_taskremoved");
            
    }
    private void handleStart(android.content.Intent intent) {
    	BA.LogInfo("** Service (tracker) Start **");
    	java.lang.reflect.Method startEvent = processBA.htSubs.get("service_start");
    	if (startEvent != null) {
    		if (startEvent.getParameterTypes().length > 0) {
    			anywheresoftware.b4a.objects.IntentWrapper iw = ServiceHelper.StarterHelper.handleStartIntent(intent, _service, processBA);
    			processBA.raiseEvent(null, "service_start", iw);
    		}
    		else {
    			processBA.raiseEvent(null, "service_start");
    		}
    	}
    }
	
	@Override
	public void onDestroy() {
        super.onDestroy();
        if (false) {
            BA.LogInfo("** Service (tracker) Destroy (ignored)**");
        }
        else {
            BA.LogInfo("** Service (tracker) Destroy **");
		    processBA.raiseEvent(null, "service_destroy");
            processBA.service = null;
		    mostCurrent = null;
		    processBA.setActivityPaused(true);
            processBA.runHook("ondestroy", this, null);
        }
	}

@Override
	public android.os.IBinder onBind(android.content.Intent intent) {
		return null;
	}public anywheresoftware.b4a.keywords.Common __c = null;
public static int _nid = 0;
public static boolean _tracking = false;
public static anywheresoftware.b4a.phone.Phone.PhoneWakeState _lock = null;
public static uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper _flp = null;
public static uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest _actuallr = null;
public static boolean _flpstarted = false;
public static anywheresoftware.b4a.gps.LocationWrapper _uugcoords = null;
public b4a.example.dateutils _dateutils = null;
public gunav2.keymon.com.mx.main _main = null;
public gunav2.keymon.com.mx.starter _starter = null;
public gunav2.keymon.com.mx.subs _subs = null;
public gunav2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public gunav2.keymon.com.mx.appupdater _appupdater = null;
public gunav2.keymon.com.mx.firebasemessaging _firebasemessaging = null;
public gunav2.keymon.com.mx.newinst2 _newinst2 = null;
public gunav2.keymon.com.mx.b4xpages _b4xpages = null;
public gunav2.keymon.com.mx.b4xcollections _b4xcollections = null;
public gunav2.keymon.com.mx.httputils2service _httputils2service = null;
public gunav2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public static uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest  _createlocationrequest() throws Exception{
uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest _lr = null;
 //BA.debugLineNum = 430;BA.debugLine="Private Sub CreateLocationRequest As LocationReque";
 //BA.debugLineNum = 431;BA.debugLine="Log(\"CreateLocationRequest\")";
anywheresoftware.b4a.keywords.Common.LogImpl("457802753","CreateLocationRequest",0);
 //BA.debugLineNum = 432;BA.debugLine="Dim lr As LocationRequest";
_lr = new uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest();
 //BA.debugLineNum = 433;BA.debugLine="lr.Initialize";
_lr.Initialize();
 //BA.debugLineNum = 434;BA.debugLine="lr.SetInterval(2000) 'Intervalo deseado para actu";
_lr.SetInterval((long) (2000));
 //BA.debugLineNum = 435;BA.debugLine="lr.SetFastestInterval(lr.GetInterval / 2) 'Interv";
_lr.SetFastestInterval((long) (_lr.GetInterval()/(double)2));
 //BA.debugLineNum = 436;BA.debugLine="lr.SetSmallestDisplacement(15) 'Solo registra cam";
_lr.SetSmallestDisplacement((float) (15));
 //BA.debugLineNum = 437;BA.debugLine="lr.SetPriority(lr.Priority.PRIORITY_HIGH_ACCURACY";
_lr.SetPriority(_lr.Priority.PRIORITY_HIGH_ACCURACY);
 //BA.debugLineNum = 438;BA.debugLine="actualLR=lr";
_actuallr = _lr;
 //BA.debugLineNum = 439;BA.debugLine="Return lr";
if (true) return _lr;
 //BA.debugLineNum = 440;BA.debugLine="End Sub";
return null;
}
public static uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest  _createlocationrequest2() throws Exception{
boolean _logger = false;
uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest _lr = null;
 //BA.debugLineNum = 455;BA.debugLine="Private Sub CreateLocationRequest2 As LocationRequ";
 //BA.debugLineNum = 456;BA.debugLine="Private logger As Boolean = True";
_logger = anywheresoftware.b4a.keywords.Common.True;
 //BA.debugLineNum = 457;BA.debugLine="If logger Then Log(\"Iniciamos CreateLocationReque";
if (_logger) { 
anywheresoftware.b4a.keywords.Common.LogImpl("457933826","Iniciamos CreateLocationRequest2",0);};
 //BA.debugLineNum = 458;BA.debugLine="Dim lr As LocationRequest";
_lr = new uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest();
 //BA.debugLineNum = 459;BA.debugLine="lr.Initialize";
_lr.Initialize();
 //BA.debugLineNum = 460;BA.debugLine="lr.SetInterval(1000) 'Intervalo deseado para actu";
_lr.SetInterval((long) (1000));
 //BA.debugLineNum = 461;BA.debugLine="lr.SetFastestInterval(lr.GetInterval / 2) 'Interv";
_lr.SetFastestInterval((long) (_lr.GetInterval()/(double)2));
 //BA.debugLineNum = 462;BA.debugLine="lr.setNumUpdates(2) 'Solicitamos solo x actualiza";
_lr.SetNumUpdates((int) (2));
 //BA.debugLineNum = 463;BA.debugLine="lr.SetSmallestDisplacement(1) 'Solo registra camb";
_lr.SetSmallestDisplacement((float) (1));
 //BA.debugLineNum = 464;BA.debugLine="lr.SetPriority(lr.Priority.PRIORITY_HIGH_ACCURACY";
_lr.SetPriority(_lr.Priority.PRIORITY_HIGH_ACCURACY);
 //BA.debugLineNum = 465;BA.debugLine="actualLR=lr";
_actuallr = _lr;
 //BA.debugLineNum = 466;BA.debugLine="Return lr";
if (true) return _lr;
 //BA.debugLineNum = 467;BA.debugLine="End Sub";
return null;
}
public static uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest  _createlocationrequestsmalld() throws Exception{
uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest _lr = null;
 //BA.debugLineNum = 442;BA.debugLine="Private Sub CreateLocationRequestSmallD As Locatio";
 //BA.debugLineNum = 443;BA.debugLine="Log(\"Iniciamos CreateLocationRequestSmallD\")";
anywheresoftware.b4a.keywords.Common.LogImpl("457868289","Iniciamos CreateLocationRequestSmallD",0);
 //BA.debugLineNum = 444;BA.debugLine="Dim lr As LocationRequest";
_lr = new uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest();
 //BA.debugLineNum = 445;BA.debugLine="lr.Initialize";
_lr.Initialize();
 //BA.debugLineNum = 446;BA.debugLine="lr.SetInterval(2000) 'Intervalo deseado para actu";
_lr.SetInterval((long) (2000));
 //BA.debugLineNum = 447;BA.debugLine="lr.SetFastestInterval(lr.GetInterval / 2) 'Interv";
_lr.SetFastestInterval((long) (_lr.GetInterval()/(double)2));
 //BA.debugLineNum = 448;BA.debugLine="lr.setNumUpdates(2) 'Solicitamos solo x actualiza";
_lr.SetNumUpdates((int) (2));
 //BA.debugLineNum = 449;BA.debugLine="lr.SetSmallestDisplacement(3) 'Solo registra camb";
_lr.SetSmallestDisplacement((float) (3));
 //BA.debugLineNum = 450;BA.debugLine="lr.SetPriority(lr.Priority.PRIORITY_HIGH_ACCURACY";
_lr.SetPriority(_lr.Priority.PRIORITY_HIGH_ACCURACY);
 //BA.debugLineNum = 451;BA.debugLine="actualLR=lr";
_actuallr = _lr;
 //BA.debugLineNum = 452;BA.debugLine="Return lr";
if (true) return _lr;
 //BA.debugLineNum = 453;BA.debugLine="End Sub";
return null;
}
public static anywheresoftware.b4a.objects.NotificationWrapper  _createnotification(String _body) throws Exception{
anywheresoftware.b4a.objects.NotificationWrapper _notification = null;
 //BA.debugLineNum = 534;BA.debugLine="Sub CreateNotification (Body As String) As Notific";
 //BA.debugLineNum = 535;BA.debugLine="Dim notification As Notification";
_notification = new anywheresoftware.b4a.objects.NotificationWrapper();
 //BA.debugLineNum = 536;BA.debugLine="notification.Initialize2(notification.IMPORTANCE_";
_notification.Initialize2(_notification.IMPORTANCE_LOW);
 //BA.debugLineNum = 537;BA.debugLine="notification.Icon = \"icon\"";
_notification.setIcon("icon");
 //BA.debugLineNum = 538;BA.debugLine="notification.SetInfo(\"GUNA\", Body, Main)";
_notification.SetInfoNew(processBA,BA.ObjectToCharSequence("GUNA"),BA.ObjectToCharSequence(_body),(Object)(mostCurrent._main.getObject()));
 //BA.debugLineNum = 539;BA.debugLine="Return notification";
if (true) return _notification;
 //BA.debugLineNum = 540;BA.debugLine="End Sub";
return null;
}
public static String  _dameultimaubicacionconocida() throws Exception{
String _coords = "";
 //BA.debugLineNum = 469;BA.debugLine="Sub dameUltimaUbicacionConocida";
 //BA.debugLineNum = 470;BA.debugLine="If FLP.GetLastKnownLocation.IsInitialized Then 'M";
if (_flp.GetLastKnownLocation().IsInitialized()) { 
 //BA.debugLineNum = 472;BA.debugLine="If Starter.Logger Then LogColor($\"Mandamos UUC \"";
if (mostCurrent._starter._logger /*boolean*/ ) { 
anywheresoftware.b4a.keywords.Common.LogImpl("457999363",("Mandamos UUC \""+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._subs._fechakmt /*String*/ (processBA,BA.NumberToString(_flp.GetLastKnownLocation().getTime()))))+"|Acc:"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("0.2",(Object)(_flp.GetLastKnownLocation().getAccuracy()))+"|"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("0.8",(Object)(_flp.GetLastKnownLocation().getLatitude()))+"|"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("0.8",(Object)(_flp.GetLastKnownLocation().getLongitude()))+"|Spd:"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("0.2",(Object)(_flp.GetLastKnownLocation().getSpeed()))+"|"),anywheresoftware.b4a.keywords.Common.Colors.RGB((int) (255),(int) (112),(int) (35)));};
 //BA.debugLineNum = 473;BA.debugLine="Dim coords As String = FLP.GetLastKnownLocation.";
_coords = BA.NumberToString(_flp.GetLastKnownLocation().getLatitude())+","+BA.NumberToString(_flp.GetLastKnownLocation().getLongitude())+","+_formatofecha(BA.NumberToString(_flp.GetLastKnownLocation().getTime()));
 };
 //BA.debugLineNum = 477;BA.debugLine="End Sub";
return "";
}
public static String  _flp_connectionfailed(int _connectionresult1) throws Exception{
 //BA.debugLineNum = 360;BA.debugLine="Sub flp_ConnectionFailed(ConnectionResult1 As Int)";
 //BA.debugLineNum = 361;BA.debugLine="Log(\"Failed to connect to location provider\")";
anywheresoftware.b4a.keywords.Common.LogImpl("457409537","Failed to connect to location provider",0);
 //BA.debugLineNum = 362;BA.debugLine="End Sub";
return "";
}
public static String  _flp_connectionsuccess() throws Exception{
 //BA.debugLineNum = 355;BA.debugLine="Sub flp_ConnectionSuccess";
 //BA.debugLineNum = 358;BA.debugLine="End Sub";
return "";
}
public static String  _flp_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
String _sdate = "";
String _stime = "";
String _coords = "";
 //BA.debugLineNum = 487;BA.debugLine="Sub flp_LocationChanged (Location1 As Location)";
 //BA.debugLineNum = 488;BA.debugLine="Log($\"Loc changed:${Location1.Longitude},${Locati";
anywheresoftware.b4a.keywords.Common.LogImpl("458130433",("Loc changed:"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(_location1.getLongitude()))+","+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(_location1.getLatitude()))+""),0);
 //BA.debugLineNum = 490;BA.debugLine="B4XPages.MainPage.lat_gps = Location1.Latitude";
mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._lat_gps /*String*/  = BA.NumberToString(_location1.getLatitude());
 //BA.debugLineNum = 491;BA.debugLine="B4XPages.MainPage.lon_gps = Location1.Longitude";
mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._lon_gps /*String*/  = BA.NumberToString(_location1.getLongitude());
 //BA.debugLineNum = 492;BA.debugLine="UUGCoords = Location1";
_uugcoords = _location1;
 //BA.debugLineNum = 500;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 501;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
anywheresoftware.b4a.keywords.Common.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 502;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = anywheresoftware.b4a.keywords.Common.DateTime.Date(anywheresoftware.b4a.keywords.Common.DateTime.getNow());
 //BA.debugLineNum = 503;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = anywheresoftware.b4a.keywords.Common.DateTime.Time(anywheresoftware.b4a.keywords.Common.DateTime.getNow());
 //BA.debugLineNum = 504;BA.debugLine="If Not(B4XPages.MainPage.skmt.IsInitialized) Then";
if (anywheresoftware.b4a.keywords.Common.Not(mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._skmt /*anywheresoftware.b4a.sql.SQL*/ .IsInitialized())) { 
mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(mostCurrent._starter._ruta /*String*/ ,"kmt.db",anywheresoftware.b4a.keywords.Common.True);};
 //BA.debugLineNum = 505;BA.debugLine="Try";
try { //BA.debugLineNum = 506;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  HIST_GPS (HGDATE, HGLAT, HGLON) VALUES(?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_sdate+_stime),(Object)(mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._lat_gps /*String*/ ),(Object)(mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._lon_gps /*String*/ )}));
 //BA.debugLineNum = 507;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_GPS");
 } 
       catch (Exception e14) {
			processBA.setLastException(e14); //BA.debugLineNum = 509;BA.debugLine="LogColor(LastException, Colors.Red)";
anywheresoftware.b4a.keywords.Common.LogImpl("458130454",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),anywheresoftware.b4a.keywords.Common.Colors.Red);
 };
 //BA.debugLineNum = 512;BA.debugLine="Dim coords As String = Location1.Latitude&\",\"&Loc";
_coords = BA.NumberToString(_location1.getLatitude())+","+BA.NumberToString(_location1.getLongitude())+","+_formatofecha(BA.NumberToString(_location1.getTime()));
 //BA.debugLineNum = 517;BA.debugLine="If Location1.Accuracy < 100 Then";
if (_location1.getAccuracy()<100) { 
 };
 //BA.debugLineNum = 521;BA.debugLine="CallSub2(Starter, \"GPS_LocationChanged\", Location";
anywheresoftware.b4a.keywords.Common.CallSubNew2(processBA,(Object)(mostCurrent._starter.getObject()),"GPS_LocationChanged",(Object)(_location1));
 //BA.debugLineNum = 525;BA.debugLine="If B4XPages.MainPage.cliente.IsInitialized And St";
if (mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._cliente /*gunav2.keymon.com.mx.c_cliente*/ .IsInitialized /*boolean*/ () && mostCurrent._starter._encliente /*boolean*/ ) { 
 //BA.debugLineNum = 526;BA.debugLine="CallSub2(B4XPages.GetPage(\"Cliente\"), \"GPS_Locat";
anywheresoftware.b4a.keywords.Common.CallSubNew2(processBA,mostCurrent._b4xpages._getpage /*Object*/ (processBA,"Cliente"),"GPS_LocationChanged",(Object)(_location1));
 };
 //BA.debugLineNum = 528;BA.debugLine="If B4XPages.MainPage.nuevoCliente.IsInitialized T";
if (mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._nuevocliente /*gunav2.keymon.com.mx.c_nuevocliente*/ .IsInitialized /*boolean*/ ()) { 
 //BA.debugLineNum = 529;BA.debugLine="CallSub2(B4XPages.GetPage(\"nuevocliente\"), \"GPS_";
anywheresoftware.b4a.keywords.Common.CallSubNew2(processBA,mostCurrent._b4xpages._getpage /*Object*/ (processBA,"nuevocliente"),"GPS_LocationChanged",(Object)(_location1));
 };
 //BA.debugLineNum = 532;BA.debugLine="End Sub";
return "";
}
public static String  _formatofecha(String _fecha) throws Exception{
String _origformat = "";
String _lastupdate = "";
 //BA.debugLineNum = 550;BA.debugLine="Sub formatoFecha(fecha As String) As String 'Convi";
 //BA.debugLineNum = 552;BA.debugLine="Dim OrigFormat As String = DateTime.DateFormat  '";
_origformat = anywheresoftware.b4a.keywords.Common.DateTime.getDateFormat();
 //BA.debugLineNum = 553;BA.debugLine="DateTime.DateFormat=\"yyMMddHHmmss\"";
anywheresoftware.b4a.keywords.Common.DateTime.setDateFormat("yyMMddHHmmss");
 //BA.debugLineNum = 554;BA.debugLine="Dim lastUpdate As String=DateTime.Date(fecha)";
_lastupdate = anywheresoftware.b4a.keywords.Common.DateTime.Date((long)(Double.parseDouble(_fecha)));
 //BA.debugLineNum = 555;BA.debugLine="DateTime.DateFormat=OrigFormat  'return to orig d";
anywheresoftware.b4a.keywords.Common.DateTime.setDateFormat(_origformat);
 //BA.debugLineNum = 557;BA.debugLine="Return lastUpdate";
if (true) return _lastupdate;
 //BA.debugLineNum = 558;BA.debugLine="End Sub";
return "";
}
public static String  _process_globals() throws Exception{
 //BA.debugLineNum = 334;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 335;BA.debugLine="Private nid As Int = 51042";
_nid = (int) (51042);
 //BA.debugLineNum = 336;BA.debugLine="Private Tracking As Boolean";
_tracking = false;
 //BA.debugLineNum = 337;BA.debugLine="Private lock As PhoneWakeState";
_lock = new anywheresoftware.b4a.phone.Phone.PhoneWakeState();
 //BA.debugLineNum = 339;BA.debugLine="Public FLP As FusedLocationProvider";
_flp = new uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper();
 //BA.debugLineNum = 340;BA.debugLine="Dim actualLR As LocationRequest";
_actuallr = new uk.co.martinpearman.b4a.fusedlocationprovider.LocationRequest();
 //BA.debugLineNum = 341;BA.debugLine="Private flpStarted As Boolean";
_flpstarted = false;
 //BA.debugLineNum = 343;BA.debugLine="Dim UUGCoords As Location 'Ultima Ubicacion Guard";
_uugcoords = new anywheresoftware.b4a.gps.LocationWrapper();
 //BA.debugLineNum = 344;BA.debugLine="End Sub";
return "";
}
public static String  _revisaflp() throws Exception{
boolean _todobienflp = false;
 //BA.debugLineNum = 561;BA.debugLine="Sub revisaFLP 'ignore";
 //BA.debugLineNum = 562;BA.debugLine="LogColor(\"**** **** Revisamos FLP **** ****\", Col";
anywheresoftware.b4a.keywords.Common.LogImpl("458392577","**** **** Revisamos FLP **** ****",anywheresoftware.b4a.keywords.Common.Colors.RGB((int) (78),(int) (0),(int) (227)));
 //BA.debugLineNum = 563;BA.debugLine="Private todoBienFLP As Boolean = True";
_todobienflp = anywheresoftware.b4a.keywords.Common.True;
 //BA.debugLineNum = 564;BA.debugLine="Try";
try { //BA.debugLineNum = 565;BA.debugLine="If Not(FLP.IsInitialized) Then";
if (anywheresoftware.b4a.keywords.Common.Not(_flp.IsInitialized())) { 
 //BA.debugLineNum = 566;BA.debugLine="Subs.log2DB(\"revisaFLP: No esta inicializado ..";
mostCurrent._subs._log2db /*String*/ (processBA,"revisaFLP: No esta inicializado ... 'Reinicializando FLP'");
 //BA.debugLineNum = 567;BA.debugLine="FLP.Initialize(\"flp\")";
_flp.Initialize(processBA,"flp");
 //BA.debugLineNum = 568;BA.debugLine="todoBienFLP = False";
_todobienflp = anywheresoftware.b4a.keywords.Common.False;
 };
 } 
       catch (Exception e10) {
			processBA.setLastException(e10); //BA.debugLineNum = 571;BA.debugLine="LogColor(\"If Not(Tracker.FLP.IsInitialized) -->";
anywheresoftware.b4a.keywords.Common.LogImpl("458392586","If Not(Tracker.FLP.IsInitialized) --> "+BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),anywheresoftware.b4a.keywords.Common.Colors.Red);
 };
 //BA.debugLineNum = 573;BA.debugLine="Try";
try { //BA.debugLineNum = 574;BA.debugLine="If FLP.IsInitialized Then";
if (_flp.IsInitialized()) { 
 //BA.debugLineNum = 575;BA.debugLine="Try";
try { //BA.debugLineNum = 576;BA.debugLine="If Not(FLP.IsConnected) Then";
if (anywheresoftware.b4a.keywords.Common.Not(_flp.IsConnected())) { 
 //BA.debugLineNum = 577;BA.debugLine="Subs.log2DB(\"revisaFLP: No esta conectado ...";
mostCurrent._subs._log2db /*String*/ (processBA,"revisaFLP: No esta conectado ... 'Reconectando FLP'");
 //BA.debugLineNum = 579;BA.debugLine="StartFLP";
_startflp();
 //BA.debugLineNum = 580;BA.debugLine="todoBienFLP = False";
_todobienflp = anywheresoftware.b4a.keywords.Common.False;
 };
 } 
       catch (Exception e21) {
			processBA.setLastException(e21); //BA.debugLineNum = 583;BA.debugLine="LogColor(\"If Not(Tracker.FLP.IsConnected) -->";
anywheresoftware.b4a.keywords.Common.LogImpl("458392598","If Not(Tracker.FLP.IsConnected) --> "+BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),anywheresoftware.b4a.keywords.Common.Colors.Red);
 };
 //BA.debugLineNum = 585;BA.debugLine="Try";
try { //BA.debugLineNum = 586;BA.debugLine="If FLP.IsConnected And _ 					FLP.GetLastKnown";
if (_flp.IsConnected() && _flp.GetLastKnownLocation().IsInitialized() && _flp.GetLastKnownLocation().DistanceTo((android.location.Location)(_uugcoords.getObject()))>500) { 
 //BA.debugLineNum = 589;BA.debugLine="Subs.log2DB(\"revisaFLP: 'No se esta actualiza";
mostCurrent._subs._log2db /*String*/ (processBA,"revisaFLP: 'No se esta actualizando, lo reiniciamos ...'");
 //BA.debugLineNum = 590;BA.debugLine="StartService(Me)";
anywheresoftware.b4a.keywords.Common.StartService(processBA,tracker.getObject());
 //BA.debugLineNum = 591;BA.debugLine="todoBienFLP = False";
_todobienflp = anywheresoftware.b4a.keywords.Common.False;
 };
 } 
       catch (Exception e30) {
			processBA.setLastException(e30); //BA.debugLineNum = 594;BA.debugLine="LogColor(\"If FLP.IsConnectctd and FLP.getLKL.I";
anywheresoftware.b4a.keywords.Common.LogImpl("458392609","If FLP.IsConnectctd and FLP.getLKL.IsInitialized --> "+BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),anywheresoftware.b4a.keywords.Common.Colors.Red);
 };
 };
 //BA.debugLineNum = 597;BA.debugLine="If todoBienFLP Then LogColor(\" +++ +++ Sin error";
if (_todobienflp) { 
anywheresoftware.b4a.keywords.Common.LogImpl("458392612"," +++ +++ Sin errores en FLP",anywheresoftware.b4a.keywords.Common.Colors.Green);};
 } 
       catch (Exception e35) {
			processBA.setLastException(e35); //BA.debugLineNum = 599;BA.debugLine="LogColor(\"If Tracker.FLP.IsInitialized --> \"&Las";
anywheresoftware.b4a.keywords.Common.LogImpl("458392614","If Tracker.FLP.IsInitialized --> "+BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),anywheresoftware.b4a.keywords.Common.Colors.Red);
 };
 //BA.debugLineNum = 602;BA.debugLine="End Sub";
return "";
}
public static String  _revisauug() throws Exception{
int _daa = 0;
 //BA.debugLineNum = 606;BA.debugLine="Sub revisaUUG 'ignore";
 //BA.debugLineNum = 607;BA.debugLine="Try";
try { //BA.debugLineNum = 609;BA.debugLine="If FLP.IsInitialized And FLP.IsConnected Then";
if (_flp.IsInitialized() && _flp.IsConnected()) { 
 //BA.debugLineNum = 610;BA.debugLine="Try";
try { //BA.debugLineNum = 611;BA.debugLine="If FLP.GetLastKnownLocation.IsInitialized Then";
if (_flp.GetLastKnownLocation().IsInitialized()) { 
 //BA.debugLineNum = 613;BA.debugLine="Dim daa As Int = UUGCoords.DistanceTo(FLP.Get";
_daa = (int) (_uugcoords.DistanceTo((android.location.Location)(_flp.GetLastKnownLocation().getObject())));
 //BA.debugLineNum = 614;BA.debugLine="If Starter.Logger Then LogColor($\"**** UUC \"$";
if (mostCurrent._starter._logger /*boolean*/ ) { 
anywheresoftware.b4a.keywords.Common.LogImpl("458458120",("**** UUC \""+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(mostCurrent._subs._fechakmt /*String*/ (processBA,BA.NumberToString(_flp.GetLastKnownLocation().getTime()))))+"|"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("0.2",(Object)(_flp.GetLastKnownLocation().getAccuracy()))+"|"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("0.8",(Object)(_flp.GetLastKnownLocation().getLatitude()))+"|"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("0.8",(Object)(_flp.GetLastKnownLocation().getLongitude()))+"|"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("0.2",(Object)(_flp.GetLastKnownLocation().getSpeed()))+"|"),anywheresoftware.b4a.keywords.Common.Colors.RGB((int) (255),(int) (112),(int) (35)));};
 //BA.debugLineNum = 615;BA.debugLine="If daa > 40 And FLP.GetLastKnownLocation.Accu";
if (_daa>40 && _flp.GetLastKnownLocation().getAccuracy()<35) { 
 //BA.debugLineNum = 616;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
mostCurrent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (processBA)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO RUTA_GPS(fecha, lat, lon) VALUES (?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(mostCurrent._subs._fechakmt /*String*/ (processBA,BA.NumberToString(_flp.GetLastKnownLocation().getTime()))),(Object)(_flp.GetLastKnownLocation().getLatitude()),(Object)(_flp.GetLastKnownLocation().getLongitude())}));
 //BA.debugLineNum = 617;BA.debugLine="If Starter.Logger Then Log(\"++++ Distancia a";
if (mostCurrent._starter._logger /*boolean*/ ) { 
anywheresoftware.b4a.keywords.Common.LogImpl("458458123","++++ Distancia a anterior="+BA.NumberToString(_daa)+"|"+"Precision="+BA.NumberToString(_flp.GetLastKnownLocation().getAccuracy()),0);};
 };
 //BA.debugLineNum = 619;BA.debugLine="UUGCoords = FLP.GetLastKnownLocation";
_uugcoords = _flp.GetLastKnownLocation();
 };
 } 
       catch (Exception e14) {
			processBA.setLastException(e14); //BA.debugLineNum = 622;BA.debugLine="LogColor(\"FLP.GetLastKnownLocation.IsInitializ";
anywheresoftware.b4a.keywords.Common.LogImpl("458458128","FLP.GetLastKnownLocation.IsInitialized --> "+BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),anywheresoftware.b4a.keywords.Common.Colors.Red);
 };
 }else {
 //BA.debugLineNum = 625;BA.debugLine="Log(\"StartFLP\")";
anywheresoftware.b4a.keywords.Common.LogImpl("458458131","StartFLP",0);
 //BA.debugLineNum = 626;BA.debugLine="StartFLP";
_startflp();
 };
 } 
       catch (Exception e21) {
			processBA.setLastException(e21); //BA.debugLineNum = 629;BA.debugLine="LogColor(\"If FLP.IsInitialized --> \"&LastExcepti";
anywheresoftware.b4a.keywords.Common.LogImpl("458458135","If FLP.IsInitialized --> "+BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),anywheresoftware.b4a.keywords.Common.Colors.Red);
 };
 //BA.debugLineNum = 631;BA.debugLine="End Sub";
return "";
}
public static String  _service_create() throws Exception{
 //BA.debugLineNum = 346;BA.debugLine="Sub Service_Create";
 //BA.debugLineNum = 347;BA.debugLine="Service.AutomaticForegroundMode = Service.AUTOMAT";
mostCurrent._service.AutomaticForegroundMode = mostCurrent._service.AUTOMATIC_FOREGROUND_NEVER;
 //BA.debugLineNum = 349;BA.debugLine="FLP.Initialize(\"flp\")";
_flp.Initialize(processBA,"flp");
 //BA.debugLineNum = 350;BA.debugLine="FLP.Connect";
_flp.Connect();
 //BA.debugLineNum = 351;BA.debugLine="lock.PartialLock";
_lock.PartialLock(processBA);
 //BA.debugLineNum = 352;BA.debugLine="StartFLP";
_startflp();
 //BA.debugLineNum = 353;BA.debugLine="End Sub";
return "";
}
public static String  _service_destroy() throws Exception{
 //BA.debugLineNum = 542;BA.debugLine="Sub Service_Destroy";
 //BA.debugLineNum = 543;BA.debugLine="If Tracking Then";
if (_tracking) { 
 //BA.debugLineNum = 544;BA.debugLine="StopFLP";
_stopflp();
 };
 //BA.debugLineNum = 546;BA.debugLine="Tracking = False";
_tracking = anywheresoftware.b4a.keywords.Common.False;
 //BA.debugLineNum = 547;BA.debugLine="lock.ReleasePartialLock";
_lock.ReleasePartialLock();
 //BA.debugLineNum = 548;BA.debugLine="End Sub";
return "";
}
public static String  _service_start(anywheresoftware.b4a.objects.IntentWrapper _startingintent) throws Exception{
 //BA.debugLineNum = 364;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
 //BA.debugLineNum = 366;BA.debugLine="Service.StopAutomaticForeground";
mostCurrent._service.StopAutomaticForeground();
 //BA.debugLineNum = 367;BA.debugLine="Service.StartForeground(nid, CreateNotification(\"";
mostCurrent._service.StartForeground(_nid,(android.app.Notification)(_createnotification("...").getObject()));
 //BA.debugLineNum = 368;BA.debugLine="Track";
_track();
 //BA.debugLineNum = 369;BA.debugLine="StartServiceAt(Me, DateTime.Now + 5 * DateTime.Ti";
anywheresoftware.b4a.keywords.Common.StartServiceAt(processBA,tracker.getObject(),(long) (anywheresoftware.b4a.keywords.Common.DateTime.getNow()+5*anywheresoftware.b4a.keywords.Common.DateTime.TicksPerMinute),anywheresoftware.b4a.keywords.Common.True);
 //BA.debugLineNum = 370;BA.debugLine="FLP.GetLastKnownLocation.Initialize";
_flp.GetLastKnownLocation().Initialize();
 //BA.debugLineNum = 371;BA.debugLine="End Sub";
return "";
}
public static void  _startflp() throws Exception{
ResumableSub_StartFLP rsub = new ResumableSub_StartFLP(null);
rsub.resume(processBA, null);
}
public static class ResumableSub_StartFLP extends BA.ResumableSub {
public ResumableSub_StartFLP(gunav2.keymon.com.mx.tracker parent) {
this.parent = parent;
}
gunav2.keymon.com.mx.tracker parent;

@Override
public void resume(BA ba, Object[] result) throws Exception{

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

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 390;BA.debugLine="Log(\"StartFLP - flpStarted=\"&flpStarted)";
anywheresoftware.b4a.keywords.Common.LogImpl("457606145","StartFLP - flpStarted="+BA.ObjectToString(parent._flpstarted),0);
 //BA.debugLineNum = 391;BA.debugLine="Do While FLP.IsConnected = False";
if (true) break;

case 1:
//do while
this.state = 4;
while (parent._flp.IsConnected()==anywheresoftware.b4a.keywords.Common.False) {
this.state = 3;
if (true) break;
}
if (true) break;

case 3:
//C
this.state = 1;
 //BA.debugLineNum = 392;BA.debugLine="Sleep(500)";
anywheresoftware.b4a.keywords.Common.Sleep(processBA,this,(int) (500));
this.state = 5;
return;
case 5:
//C
this.state = 1;
;
 if (true) break;

case 4:
//C
this.state = -1;
;
 //BA.debugLineNum = 397;BA.debugLine="FLP.RequestLocationUpdates(CreateLocationRequest)";
parent._flp.RequestLocationUpdates((com.google.android.gms.location.LocationRequest)(_createlocationrequest().getObject()));
 //BA.debugLineNum = 400;BA.debugLine="flpStarted = True";
parent._flpstarted = anywheresoftware.b4a.keywords.Common.True;
 //BA.debugLineNum = 402;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public static void  _startflp2() throws Exception{
ResumableSub_StartFLP2 rsub = new ResumableSub_StartFLP2(null);
rsub.resume(processBA, null);
}
public static class ResumableSub_StartFLP2 extends BA.ResumableSub {
public ResumableSub_StartFLP2(gunav2.keymon.com.mx.tracker parent) {
this.parent = parent;
}
gunav2.keymon.com.mx.tracker parent;
boolean _logger = false;

@Override
public void resume(BA ba, Object[] result) throws Exception{

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

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 405;BA.debugLine="Log(\"StartFLP2\")";
anywheresoftware.b4a.keywords.Common.LogImpl("457671681","StartFLP2",0);
 //BA.debugLineNum = 406;BA.debugLine="Private logger As Boolean = True";
_logger = anywheresoftware.b4a.keywords.Common.True;
 //BA.debugLineNum = 407;BA.debugLine="If logger Then Log(\"StartFLP2 - flpStarted=\"&flpS";
if (true) break;

case 1:
//if
this.state = 6;
if (_logger) { 
this.state = 3;
;}if (true) break;

case 3:
//C
this.state = 6;
anywheresoftware.b4a.keywords.Common.LogImpl("457671683","StartFLP2 - flpStarted="+BA.ObjectToString(parent._flpstarted),0);
if (true) break;

case 6:
//C
this.state = 7;
;
 //BA.debugLineNum = 408;BA.debugLine="Do While FLP.IsConnected = False";
if (true) break;

case 7:
//do while
this.state = 16;
while (parent._flp.IsConnected()==anywheresoftware.b4a.keywords.Common.False) {
this.state = 9;
if (true) break;
}
if (true) break;

case 9:
//C
this.state = 10;
 //BA.debugLineNum = 409;BA.debugLine="Sleep(500)";
anywheresoftware.b4a.keywords.Common.Sleep(processBA,this,(int) (500));
this.state = 23;
return;
case 23:
//C
this.state = 10;
;
 //BA.debugLineNum = 410;BA.debugLine="If logger Then Log(\"kll - sleeping\")";
if (true) break;

case 10:
//if
this.state = 15;
if (_logger) { 
this.state = 12;
;}if (true) break;

case 12:
//C
this.state = 15;
anywheresoftware.b4a.keywords.Common.LogImpl("457671686","kll - sleeping",0);
if (true) break;

case 15:
//C
this.state = 7;
;
 if (true) break;

case 16:
//C
this.state = 17;
;
 //BA.debugLineNum = 412;BA.debugLine="dameUltimaUbicacionConocida 'Regresamos ultima ub";
_dameultimaubicacionconocida();
 //BA.debugLineNum = 413;BA.debugLine="FLP.RequestLocationUpdates(CreateLocationRequest2";
parent._flp.RequestLocationUpdates((com.google.android.gms.location.LocationRequest)(_createlocationrequest2().getObject()));
 //BA.debugLineNum = 414;BA.debugLine="If logger Then LogColor(\"Buscamos ubicacion (movi";
if (true) break;

case 17:
//if
this.state = 22;
if (_logger) { 
this.state = 19;
;}if (true) break;

case 19:
//C
this.state = 22;
anywheresoftware.b4a.keywords.Common.LogImpl("457671690","Buscamos ubicacion (movimientoMinimo = "+BA.NumberToString(parent._actuallr.GetSmallestDisplacement())+")",anywheresoftware.b4a.keywords.Common.Colors.Magenta);
if (true) break;

case 22:
//C
this.state = -1;
;
 //BA.debugLineNum = 416;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public static void  _startflpsmall() throws Exception{
ResumableSub_StartFLPSmall rsub = new ResumableSub_StartFLPSmall(null);
rsub.resume(processBA, null);
}
public static class ResumableSub_StartFLPSmall extends BA.ResumableSub {
public ResumableSub_StartFLPSmall(gunav2.keymon.com.mx.tracker parent) {
this.parent = parent;
}
gunav2.keymon.com.mx.tracker parent;

@Override
public void resume(BA ba, Object[] result) throws Exception{

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

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 419;BA.debugLine="Log(\"StartFLPSmall - flpStarted=\"&flpStarted)";
anywheresoftware.b4a.keywords.Common.LogImpl("457737217","StartFLPSmall - flpStarted="+BA.ObjectToString(parent._flpstarted),0);
 //BA.debugLineNum = 420;BA.debugLine="Do While FLP.IsConnected = False";
if (true) break;

case 1:
//do while
this.state = 4;
while (parent._flp.IsConnected()==anywheresoftware.b4a.keywords.Common.False) {
this.state = 3;
if (true) break;
}
if (true) break;

case 3:
//C
this.state = 1;
 //BA.debugLineNum = 421;BA.debugLine="Sleep(500)";
anywheresoftware.b4a.keywords.Common.Sleep(processBA,this,(int) (500));
this.state = 5;
return;
case 5:
//C
this.state = 1;
;
 //BA.debugLineNum = 422;BA.debugLine="Log(\"sleeping\")";
anywheresoftware.b4a.keywords.Common.LogImpl("457737220","sleeping",0);
 if (true) break;

case 4:
//C
this.state = -1;
;
 //BA.debugLineNum = 424;BA.debugLine="dameUltimaUbicacionConocida 'Regresamos ultima ub";
_dameultimaubicacionconocida();
 //BA.debugLineNum = 425;BA.debugLine="FLP.RequestLocationUpdates(CreateLocationRequestS";
parent._flp.RequestLocationUpdates((com.google.android.gms.location.LocationRequest)(_createlocationrequestsmalld().getObject()));
 //BA.debugLineNum = 428;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public static String  _stopflp() throws Exception{
 //BA.debugLineNum = 479;BA.debugLine="Public Sub StopFLP";
 //BA.debugLineNum = 480;BA.debugLine="Log(\"StopFLP\")";
anywheresoftware.b4a.keywords.Common.LogImpl("458064897","StopFLP",0);
 //BA.debugLineNum = 481;BA.debugLine="If flpStarted Then";
if (_flpstarted) { 
 //BA.debugLineNum = 482;BA.debugLine="FLP.RemoveLocationUpdates  'Eliminamos todas las";
_flp.RemoveLocationUpdates();
 //BA.debugLineNum = 483;BA.debugLine="flpStarted = False";
_flpstarted = anywheresoftware.b4a.keywords.Common.False;
 };
 //BA.debugLineNum = 485;BA.debugLine="End Sub";
return "";
}
public static String  _track() throws Exception{
 //BA.debugLineNum = 373;BA.debugLine="Public Sub Track";
 //BA.debugLineNum = 374;BA.debugLine="Log(\"Inicia Track - Tracking : \"&Tracking)";
anywheresoftware.b4a.keywords.Common.LogImpl("457540609","Inicia Track - Tracking : "+BA.ObjectToString(_tracking),0);
 //BA.debugLineNum = 375;BA.debugLine="If Not(FLP.IsInitialized) Then FLP.Initialize(\"fl";
if (anywheresoftware.b4a.keywords.Common.Not(_flp.IsInitialized())) { 
_flp.Initialize(processBA,"flp");};
 //BA.debugLineNum = 376;BA.debugLine="If Not(FLP.IsConnected) Then FLP.Connect";
if (anywheresoftware.b4a.keywords.Common.Not(_flp.IsConnected())) { 
_flp.Connect();};
 //BA.debugLineNum = 377;BA.debugLine="If Tracking And actualLR.IsInitialized Then";
if (_tracking && _actuallr.IsInitialized()) { 
 //BA.debugLineNum = 379;BA.debugLine="Return 'Si ya estamos \"rastreando\" no hacemos na";
if (true) return "";
 };
 //BA.debugLineNum = 381;BA.debugLine="If Starter.rp.Check(Starter.rp.PERMISSION_ACCESS_";
if (mostCurrent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .Check(mostCurrent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .PERMISSION_ACCESS_FINE_LOCATION)==anywheresoftware.b4a.keywords.Common.False) { 
 //BA.debugLineNum = 382;BA.debugLine="Log(\"No permission\")";
anywheresoftware.b4a.keywords.Common.LogImpl("457540617","No permission",0);
 //BA.debugLineNum = 383;BA.debugLine="Return";
if (true) return "";
 };
 //BA.debugLineNum = 385;BA.debugLine="StartFLP 'Iniciamos FusedLocationProvider";
_startflp();
 //BA.debugLineNum = 386;BA.debugLine="Tracking = True";
_tracking = anywheresoftware.b4a.keywords.Common.True;
 //BA.debugLineNum = 387;BA.debugLine="End Sub";
return "";
}
}
