- Se paso la logica y restricciones de Tracker.FLP_LocationChanged a Subs.mandaLoc2.

- Se puso que con cualquier notificacion revise si puede mandar la ubicacion.
- Se puso que cuando se solicite la ubicacion con FirebaseMessaging, se mande tambien a PUSH_INFO.
This commit is contained in:
2024-05-11 04:26:09 -06:00
parent 8524dcd75e
commit 59b0831740
7 changed files with 112 additions and 57 deletions

View File

@@ -76,23 +76,24 @@ Sub NotiMon_NotificationPosted (SBN As StatusBarNotification)
Subs.revisaYmandaUUC
If Starter.logger Then LogColor(SBN.PackageName & " - " & SBN.Message, Colors.blue)
' Log("-= Notificacion recibida =-")
If SBN.PackageName = "com.whatsapp" Then
' If SBN.PackageName = "com.whatsapp" Then
' If logger Then LogColor(SBN.PackageName, Colors.Red)
' If logger Then LogColor("isGroupWA2: "&isGroupWA(SBN),Colors.Magenta)
' If logger Then LogColor("isPersonWA: "&isPersonWA(SBN),Colors.Magenta)
' If logger Then Log($"getGroupName: |${getGroupName(SBN.Title)}|"$)
' 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, pedimos actualización y mandamos UUC."$)
Tracker.flp.RequestLocationUpdates(Tracker.locReqSmall)
' 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, pedimos actualización y mandamos UUC."$)
If Starter.logger Then LogColor($"Recibimos notificación, pedimos actualización y mandamos UUC."$, Colors.Green)
If Tracker.flp.IsInitialized Then Tracker.flp.RequestLocationUpdates(Tracker.locReqSmall)
Sleep(2000)
Private ultimaLoc As Location = Subs.traeUltimaUbicacionGuardada
Subs.mandaLoc2(ultimaLoc, Starter.devModel)
End If
End If
End If
' End If
' End If
' End If
End Sub
'Regresa verdadero si el mensaje de whatsapp es un mensaje valido.