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:
@@ -86,7 +86,7 @@ Sub fm_MessageArrived (Message As RemoteMessage)
|
||||
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
|
||||
mandamosLoc($"${Starter.UUC.Latitude},${Starter.UUC.Longitude},${Subs.formatoFecha(Starter.UUC.Time)}"$)
|
||||
mandamosLoc(Starter.UUC)
|
||||
If Starter.logger Then LogColor($"Mandamos UUC: ${Starter.UUC.Latitude},${Starter.UUC.Longitude},${Subs.formatoFecha(Starter.UUC.Time)}"$, Colors.Magenta)
|
||||
End If
|
||||
locRequest="Activa"
|
||||
@@ -156,7 +156,8 @@ Sub SendMessage(params As Map)
|
||||
If Starter.logger Then Log("Mandamos mensaje: " & m)
|
||||
End Sub
|
||||
|
||||
Sub mandamosLoc(coords As String)
|
||||
Sub mandamosLoc(loc As Location)
|
||||
Dim coords As String = loc.Latitude & ","&loc.Longitude & ","&Subs.formatoFecha(DateTime.Now)
|
||||
If Starter.logger Then LogColor("Iniciamos mandamosLoc ("&coords&")", Colors.Magenta)
|
||||
' Log("locRequest="&locRequest)
|
||||
Subs.guardaInfoEnBD(coords)'Escribimos coordenadas y fecha a una bd
|
||||
@@ -168,6 +169,7 @@ Sub mandamosLoc(coords As String)
|
||||
t = "u" ' es una peticion
|
||||
End If
|
||||
Dim params As Map = CreateMap("topic":Sprvsr,"title":"ubicacionRecibida", "body":coords, "t":t)
|
||||
' Log(params)
|
||||
SendMessage(params)
|
||||
locRequest="Enviada"
|
||||
CallSubDelayed(Tracker,"CreateLocationRequest")
|
||||
|
||||
Reference in New Issue
Block a user