mirror of
https://github.com/cheveguerra/FLP_2.0.git
synced 2026-04-17 19:36:42 +00:00
Cambios en como se envian los cambios de ubicacion y como se mantiene el servicio activo
This commit is contained in:
@@ -72,9 +72,18 @@ Sub Service_Destroy
|
||||
End Sub
|
||||
|
||||
Sub NotiMon_NotificationPosted (SBN As StatusBarNotification)
|
||||
If Not(Tracker.FLP.IsInitialized) Then
|
||||
If Tracker.FLP.IsInitialized Then
|
||||
' Log($"FLP.IsInitialized - ${Tracker.flp.IsInitialized}"$)
|
||||
' Log($"FLP.IsConnecting - ${Tracker.flp.IsConnecting}"$)
|
||||
' Log($"FLP.IsConnected - ${Tracker.flp.IsConnected}"$)
|
||||
Else
|
||||
' Log($"FLP.IsInitialized - False"$)
|
||||
End If
|
||||
|
||||
If Not(Tracker.FLP.IsInitialized) Or Not(Tracker.flp.IsConnected) Then
|
||||
StartService(Tracker) 'Si el servicio no esta corriendo, lo iniciamos.
|
||||
Subs.gps_hist.ExecNonQuery($"insert into BITACORA (RUTA, TEXTO, FECHA) values ('${Starter.devModel}', 'Recibimos notificación, Tracker apagado, INICIANDOLO!!', '${Subs.fechaKMT(DateTime.now)}')"$)
|
||||
Subs.bitacora($"Recibimos notificación, Tracker apagado, INICIANDOLO!!"$)
|
||||
' Subs.gps_hist.ExecNonQuery($"insert into BITACORA (RUTA, TEXTO, FECHA) values ('${Starter.devModel}', 'Recibimos notificación, Tracker apagado, INICIANDOLO!!', '${Subs.fechaKMT(DateTime.now)}')"$)
|
||||
End If
|
||||
Private logger As Boolean = True
|
||||
If Starter.logger Then LogColor(SBN.PackageName & " - " & SBN.Message, Colors.blue)
|
||||
@@ -88,8 +97,11 @@ Sub NotiMon_NotificationPosted (SBN As StatusBarNotification)
|
||||
' Si recibimos un mensaje con la palabra "donde", "Donde" o "bien", entonces mandamos la última ubicación conocida.
|
||||
If SBN.Message.Contains("donde") Or SBN.Message.Contains("Donde") Or SBN.Message.Contains("bien") Then 'Si el mensaje contiene "#NS" y tiene un segundo parametro ...
|
||||
If esMensajeWAValido(SBN) Then
|
||||
Subs.gps_hist.ExecNonQuery($"insert into BITACORA (RUTA, TEXTO, FECHA) values ('${Starter.devModel}', 'Recibimos notificación, iniciamos StartFLP y guardamos UUC', '${Subs.fechaKMT(DateTime.now)}')"$)
|
||||
Subs.bitacora($"Recibimos notificación, iniciamos StartFLP y guardamos UUC"$)
|
||||
' Subs.gps_hist.ExecNonQuery($"insert into BITACORA (RUTA, TEXTO, FECHA) values ('${Starter.devModel}', 'Recibimos notificación, iniciamos StartFLP y guardamos UUC', '${Subs.fechaKMT(DateTime.now)}')"$)
|
||||
CallSubDelayed2(Tracker, "dameUltimaUbicacionConocida", Starter.UUC)
|
||||
FirebaseMessaging.locRequest = "Activa"
|
||||
CallSubDelayed2(FirebaseMessaging,"mandamosLoc", Starter.UUC)
|
||||
CallSubDelayed(Tracker, "StartFLP")
|
||||
If Starter.logger Then Log("Mandamos a Server")
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user