Cambio de puerto

This commit is contained in:
2023-11-07 18:59:47 -06:00
parent 68bac1707c
commit 9ed8905671
10 changed files with 508 additions and 140 deletions

View File

@@ -56,6 +56,7 @@ Sub Service_Create
#if not(DEBUG)
logger = False
#end if
Subs.revisaBD
' If logger Then Log("**************** Iniciamos Monitor Keymon ***********************")
End Sub
@@ -72,20 +73,7 @@ Sub Service_Destroy
End Sub
Sub NotiMon_NotificationPosted (SBN As StatusBarNotification)
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.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
Subs.revisaYmandaUUC
If Starter.logger Then LogColor(SBN.PackageName & " - " & SBN.Message, Colors.blue)
' Log("-= Notificacion recibida =-")
If SBN.PackageName = "com.whatsapp" Then
@@ -97,13 +85,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.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")
Subs.bitacora($"Recibimos notificación, pedimos actualización y mandamos UUC."$)
Tracker.flp.RequestLocationUpdates(Tracker.locReqSmall)
Sleep(2000)
Private ultimaLoc As Location = Subs.traeUltimaUbicacionGuardada
Subs.mandaLoc2(ultimaLoc, Starter.devModel)
End If
End If
End If