diff --git a/FLP-ML.b4a b/FLP-ML.b4a index c08ac33..ff5f757 100644 --- a/FLP-ML.b4a +++ b/FLP-ML.b4a @@ -131,7 +131,14 @@ Sub b_pong_Click End Sub Sub b_pong_LongClick - copiaDB +' copiaDB + CallSubDelayed(Tracker, "StartFLP") + If laUbicacion.IsInitialized Then Subs.mandaLocAServer(laUbicacion, Starter.devModel.Trim) + Dim params As Map = CreateMap("topic": FirebaseMessaging.Sprvsr,"title":"Prueba Trckr", "body":l_coords.Text, "d":Starter.devModel, "t":"au") + CallSubDelayed2(FirebaseMessaging, "SendMessage",params) + If Starter.logger Then Log("Start wifi scan") + wifiS.startscan("WiFi", True) + Wait For WiFi_ScanDone (Results() As String, Count As Int) End Sub Sub chkPermisosAlmacenamientoExterno diff --git a/FLP-ML.b4a.meta b/FLP-ML.b4a.meta index 602732a..2678bca 100644 --- a/FLP-ML.b4a.meta +++ b/FLP-ML.b4a.meta @@ -16,12 +16,12 @@ ModuleBreakpoints6= ModuleBreakpoints7= ModuleClosedNodes0=12,13 ModuleClosedNodes1= -ModuleClosedNodes2= +ModuleClosedNodes2=7 ModuleClosedNodes3=1 ModuleClosedNodes4= ModuleClosedNodes5=2,3 ModuleClosedNodes6=2,3,4,5,6,7,8,9,10,11,12,13 ModuleClosedNodes7=9,11 -NavigationStack=FirebaseMessaging,SendMessage,142,0,Starter,Process_Globals,5,0,Starter,Service_Start,46,0,Tracker,StartFLP,76,0,Starter,Timer1_Tick,55,6,Tracker,dameUltimaUbicacionConocida,102,1,NotificationService,NotiMon_NotificationPosted,81,6,Tracker,flp_LocationChanged,135,6,Tracker,StopFLP,128,0,Main,b_pong_Click,75,0 +NavigationStack=Starter,Timer1_Tick,55,6,NotificationService,NotiMon_NotificationPosted,81,6,Tracker,StopFLP,128,0,FirebaseMessaging,fm_MessageArrived,82,0,FirebaseMessaging,mandamosLoc,152,0,Tracker,dameUltimaUbicacionConocida,112,1,Tracker,flp_LocationChanged,142,0,Main,b_pong_Click,86,0,Visual Designer,Layout.bal,-100,1,Main,b_pong_LongClick,99,3 SelectedBuild=0 VisibleModules=5,2,7,3,6,4 diff --git a/FirebaseMessaging.bas b/FirebaseMessaging.bas index 36eebce..85d08ae 100644 --- a/FirebaseMessaging.bas +++ b/FirebaseMessaging.bas @@ -119,7 +119,7 @@ Sub fm_MessageArrived (Message As RemoteMessage) SendMessage(params) End If If tipos.IndexOf("pu") = -1 And tipos.IndexOf("ping") = -1 And tipos.IndexOf("dr") = -1 Then - if starter.logger then Log("No es ping ni solicitud de ubicacion o ruta, entonces no hacemos nada") + If Starter.logger Then Log("No es ping ni solicitud de ubicacion o ruta, entonces no hacemos nada") End If End If ' Dim n As Notification @@ -181,7 +181,7 @@ End Sub Sub PE_PhoneStateChanged (State As String, IncomingNumber As String, Intent As Intent) If Starter.logger Then Log("Phone state: " & State) If State = "RINGING" Then - if starter.logger then Log("The incoming number is: " & IncomingNumber) + If Starter.logger Then Log("The incoming number is: " & IncomingNumber) Else End If End Sub diff --git a/Tracker.bas b/Tracker.bas index 516d1fd..273eb5c 100644 --- a/Tracker.bas +++ b/Tracker.bas @@ -146,7 +146,7 @@ Sub flp_LocationChanged (Location1 As Location) If Starter.logger Then Log(Location1) If Starter.logger Then Log(Location1.Accuracy&" - "&Location1.AccuracyValid) ' solo mandamos la ubicacion si la precision es dentro de XX mts - If Location1.Accuracy < minAccuracy Then CallSubDelayed2(FirebaseMessaging,"mandamosLoc",coords) + If Location1.Accuracy < minAccuracy Then CallSubDelayed2(FirebaseMessaging,"mandamosLoc", coords) If Location1.Accuracy < minAccuracy Then Starter.UUC = Location1 If Location1.Accuracy < minAccuracy Then Subs.mandaLocAServer(Location1, Starter.devModel) If Starter.logger Then Log("Loc changed : "&Location1.Latitude&","&Location1.Longitude&"|"&Starter.devModel&"|")