mirror of
https://github.com/cheveguerra/Pusher_2.0.git
synced 2026-04-17 19:37:05 +00:00
Se agregó la variable logger en starter y condiciones para que solo mande logs cuando esta abierta la aplicacion
This commit is contained in:
@@ -200,7 +200,7 @@ Public Sub HandleJob(Job As HttpJob) As DBResult
|
|||||||
table.Columns.Initialize
|
table.Columns.Initialize
|
||||||
table.rows.Initialize
|
table.rows.Initialize
|
||||||
table.Tag = Job.Tag
|
table.Tag = Job.Tag
|
||||||
If jobTagAnterior <> Job.Tag Then LogColor("HandleJob: '"&Job.Tag&"'", Colors.Blue) 'Mod por CHV - 211023
|
If starter.logger and jobTagAnterior <> Job.Tag Then LogColor("HandleJob: '"&Job.Tag&"'", Colors.Blue) 'Mod por CHV - 211023
|
||||||
jobTagAnterior = Job.Tag 'Mod por CHV - 211023
|
jobTagAnterior = Job.Tag 'Mod por CHV - 211023
|
||||||
If method = "query" Then
|
If method = "query" Then
|
||||||
Dim numberOfColumns As Int = ReadInt(In)
|
Dim numberOfColumns As Int = ReadInt(In)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Sub Service_Start (StartingIntent As Intent)
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub fm_MessageArrived (Message As RemoteMessage)
|
Sub fm_MessageArrived (Message As RemoteMessage)
|
||||||
Log($"Pusher - Mensaje recibido: ${Message.GetData}"$)
|
If Starter.logger Then Log($"Pusher - Mensaje recibido: ${Message.GetData}"$)
|
||||||
' Log($"Message data: ${Message.GetData}"$)
|
' Log($"Message data: ${Message.GetData}"$)
|
||||||
|
|
||||||
'Si recibimos Pong, lo agregamos a la lista de dispositivos activos
|
'Si recibimos Pong, lo agregamos a la lista de dispositivos activos
|
||||||
@@ -50,7 +50,7 @@ Sub fm_MessageArrived (Message As RemoteMessage)
|
|||||||
|
|
||||||
'Si el mensaje es de ubicacion recibida
|
'Si el mensaje es de ubicacion recibida
|
||||||
If Message.GetData.ContainsKey("t") And (Message.GetData.Get("t") = "u" Or Message.GetData.Get("t") = "au") Then
|
If Message.GetData.ContainsKey("t") And (Message.GetData.Get("t") = "u" Or Message.GetData.Get("t") = "au") Then
|
||||||
Log("Pusher - Recibimos ubicacion")
|
If Starter.logger Then Log("Pusher - Recibimos ubicacion")
|
||||||
Private ubi As Location
|
Private ubi As Location
|
||||||
' Log("Llamamos UbicacionRecibida")
|
' Log("Llamamos UbicacionRecibida")
|
||||||
If Message.GetData.Get("t") = "au" Or Message.GetData.Get("t") = "u" Then
|
If Message.GetData.Get("t") = "au" Or Message.GetData.Get("t") = "u" Then
|
||||||
|
|||||||
12
Pusher.b4a
12
Pusher.b4a
@@ -71,12 +71,12 @@ Module6=Subs
|
|||||||
NumberOfFiles=19
|
NumberOfFiles=19
|
||||||
NumberOfLibraries=23
|
NumberOfLibraries=23
|
||||||
NumberOfModules=6
|
NumberOfModules=6
|
||||||
Version=12.5
|
Version=12.8
|
||||||
@EndOfDesignText@
|
@EndOfDesignText@
|
||||||
#Region Project Attributes
|
#Region Project Attributes
|
||||||
#ApplicationLabel: Pusher 2.0
|
#ApplicationLabel: Pusher 2.0
|
||||||
#VersionCode: 1
|
#VersionCode: 1
|
||||||
#VersionName: 3.11.07
|
#VersionName: 4.02.16
|
||||||
'Ver. 3.09.18 - Se agregó la posibilidad de mostrar puntos internedios en la ruta y muestra icono diferente si esta en movimiento o parado.
|
'Ver. 3.09.18 - Se agregó la posibilidad de mostrar puntos internedios en la ruta y muestra icono diferente si esta en movimiento o parado.
|
||||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||||
#SupportedOrientations: portrait
|
#SupportedOrientations: portrait
|
||||||
@@ -272,6 +272,7 @@ End Sub
|
|||||||
Sub Activity_Pause (UserClosed As Boolean)
|
Sub Activity_Pause (UserClosed As Boolean)
|
||||||
'Starter.StopFLP
|
'Starter.StopFLP
|
||||||
' CallSub(Tracker, "StopFLP")
|
' CallSub(Tracker, "StopFLP")
|
||||||
|
Starter.logger = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub Button1_Click
|
Sub Button1_Click
|
||||||
@@ -307,7 +308,7 @@ Sub JobDone(Job As HttpJob)
|
|||||||
ToastMessageShow("Error: " & Job.ErrorMessage, True)
|
ToastMessageShow("Error: " & Job.ErrorMessage, True)
|
||||||
Else
|
Else
|
||||||
If Job.JobName = "DBRequest" Then
|
If Job.JobName = "DBRequest" Then
|
||||||
LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.Green) 'Mod por CHV - 211027
|
If Starter.logger = True Then LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.Green) 'Mod por CHV - 211027
|
||||||
Dim result As DBResult = reqManager.HandleJob(Job)
|
Dim result As DBResult = reqManager.HandleJob(Job)
|
||||||
If result.Tag = "seleccionaRutaGPS2" Then 'query tag
|
If result.Tag = "seleccionaRutaGPS2" Then 'query tag
|
||||||
rutaGPS = ""
|
rutaGPS = ""
|
||||||
@@ -428,7 +429,7 @@ public Sub ubicacionRecibida(message As Map)
|
|||||||
montoTotal =message.Get("mt")
|
montoTotal =message.Get("mt")
|
||||||
batt=message.Get("b")
|
batt=message.Get("b")
|
||||||
Dim v As String = message.Get("v")
|
Dim v As String = message.Get("v")
|
||||||
Log("Ubicacion recibida : "&message.Get("d")&","&message.Get("t")&","&message.Get("body"))
|
If Starter.logger Then Log("Ubicacion recibida : "&message.Get("d")&","&message.Get("t")&","&message.Get("body"))
|
||||||
If message.Get("t") = "au" Then 'Si es actualizacion
|
If message.Get("t") = "au" Then 'Si es actualizacion
|
||||||
' For i=0 To message.Size-1
|
' For i=0 To message.Size-1
|
||||||
' Log(message.GetKeyAt(i)&"="&message.GetValueAt(i))
|
' Log(message.GetKeyAt(i)&"="&message.GetValueAt(i))
|
||||||
@@ -448,7 +449,7 @@ public Sub ubicacionRecibida(message As Map)
|
|||||||
' Log("dispositvos="&dispositivos)
|
' Log("dispositvos="&dispositivos)
|
||||||
' Log(DateTime.Time(timemarker))
|
' Log(DateTime.Time(timemarker))
|
||||||
MapFragment1_Ready
|
MapFragment1_Ready
|
||||||
Log("Dispositivos : "&dispositivos.Size)
|
If Starter.logger Then Log("Dispositivos : "&dispositivos.Size)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub agregaAListview
|
Sub agregaAListview
|
||||||
@@ -758,6 +759,7 @@ Sub s_tracker_ItemClick (Position As Int, Value As Object)
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub b_buscar_longClick
|
Sub b_buscar_longClick
|
||||||
|
Starter.logger = True
|
||||||
mapaDestino = 2
|
mapaDestino = 2
|
||||||
Subs.panelVisible(p_ruta, 0, 0)
|
Subs.panelVisible(p_ruta, 0, 0)
|
||||||
p_mapa2.Width = Activity.Width
|
p_mapa2.Width = Activity.Width
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Sub Process_Globals
|
|||||||
Public rp As RuntimePermissions
|
Public rp As RuntimePermissions
|
||||||
Public FLP As FusedLocationProvider
|
Public FLP As FusedLocationProvider
|
||||||
Dim dentroDeGeocerca As Map
|
Dim dentroDeGeocerca As Map
|
||||||
|
Dim logger As Boolean = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub Service_Create
|
Sub Service_Create
|
||||||
@@ -21,7 +22,11 @@ Sub Service_Create
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub Service_Start (StartingIntent As Intent)
|
Sub Service_Start (StartingIntent As Intent)
|
||||||
|
#if DEBUG
|
||||||
|
logger = True
|
||||||
|
#else
|
||||||
|
Logger = False
|
||||||
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
|
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user