mirror of
https://github.com/cheveguerra/FLP_2.0.git
synced 2026-04-17 19:36:42 +00:00
- 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:
@@ -54,7 +54,7 @@ Sub Service_Create
|
||||
End Sub
|
||||
|
||||
Public Sub SubscribeToTopics
|
||||
' fm.SubscribeToTopic("Trckr") 'Global (you can subscribe to more topics)
|
||||
fm.SubscribeToTopic("Trckr") 'Global (you can subscribe to more topics)
|
||||
fm.SubscribeToTopic("Trckr") 'Tracker Global
|
||||
If Starter.logger Then Log("Subscrito a tracker global")
|
||||
fm.SubscribeToTopic("Trckr-ML") 'Global (you can subscribe to more topics)
|
||||
@@ -63,6 +63,9 @@ Public Sub SubscribeToTopics
|
||||
If Starter.logger Then Log("Subscrito a "&Starter.devModel)
|
||||
If Starter.logger Then Log(fm.token)
|
||||
fm.UnsubscribeFromTopic("Sprvsr") 'Unsubscribe from topic
|
||||
' fm.UnsubscribeFromTopic("Trckr") 'Unsubscribe from topic
|
||||
' fm.UnsubscribeFromTopic("Trckr-ML") 'Unsubscribe from topic
|
||||
' fm.UnsubscribeFromTopic(Starter.devModel) 'Unsubscribe from topic
|
||||
End Sub
|
||||
|
||||
Sub Service_Start (StartingIntent As Intent)
|
||||
@@ -75,6 +78,7 @@ End Sub
|
||||
|
||||
Sub fm_MessageArrived (Message As RemoteMessage)
|
||||
If Starter.logger Then Log("Message arrived")
|
||||
If Starter.logger Then Log($"Message from: ${Message.From}"$)
|
||||
If Starter.logger Then Log($"Message data: ${Message.GetData}"$)
|
||||
Subs.getPhnId
|
||||
Subs.getSSID
|
||||
@@ -83,9 +87,11 @@ Sub fm_MessageArrived (Message As RemoteMessage)
|
||||
If tipos.IndexOf("pu") <> -1 Or tipos.IndexOf("au") <> -1 Then 'Si es una peticion de ubicacion
|
||||
If Starter.logger Then Log("Es una peticion de ubicacion")
|
||||
If Starter.logger Then Log($"UUC: ${Starter.UUC.Latitude},${Starter.UUC.Longitude}"$)
|
||||
If Starter.UUC.Latitude <> 0.0 Then
|
||||
mandaLocFM(Starter.UUC)
|
||||
If Starter.logger Then LogColor($"Mandamos UUC: ${Starter.UUC.Latitude},${Starter.UUC.Longitude},${Subs.formatoFecha(Starter.UUC.Time)}"$, Colors.Magenta)
|
||||
If Starter.UUC.IsInitialized And Starter.UUC.Latitude <> 0.0 Then
|
||||
' mandaLocFM(Starter.UUC)
|
||||
Subs.actualizaVar("solicitudFM", 1)
|
||||
If Starter.logger Then LogColor($"Llamamos mandaLoc2: ${Starter.UUC.Latitude},${Starter.UUC.Longitude},${Subs.formatoFecha(Starter.UUC.Time)}"$, Colors.Magenta)
|
||||
Subs.mandaLoc2(Starter.UUC, Starter.devModel)
|
||||
End If
|
||||
locRequest="Activa"
|
||||
If Starter.logger Then Log("Llamamos StartFLP")
|
||||
|
||||
Reference in New Issue
Block a user