VERSION 5.12.16

- Se agregó el codigo para los recordatorios a las 13:00 y a las 14:00.
- Se cambio el timer para la ubicacion en tiempo real a 5 minutos (estaba en 10 seg)
This commit is contained in:
2025-12-26 14:19:35 -06:00
parent 6a0e127bc4
commit dde7af5066
15 changed files with 283 additions and 37 deletions

View File

@@ -25,7 +25,7 @@ Sub Process_Globals
' Dim DBReqServer As String = "http://10.0.0.205:1783"
' Dim DBReqServer As String = "http://192.168.100.10:1781"
Dim Timer1 As Timer
Dim Interval As Int = 10
Dim Interval As Int = 300
Dim ruta As String = File.DirInternal
'Para los Logs
Private logs As StringBuilder
@@ -39,6 +39,8 @@ Sub Process_Globals
Private BTAdmin As BluetoothAdmin
Public BluetoothState As Boolean
Dim enVenta As Boolean = False
Dim ultimoRecordatorio As String = ""
Dim timerRecordatorio As Timer
End Sub
Sub Service_Create
@@ -71,6 +73,8 @@ Sub Service_Start (StartingIntent As Intent)
' Log(marcaCel)
If s.traeDBReqServerDeBD(skmt) <> "N/A" And s.traeDBReqServerDeBD(skmt) <> "" Then DBReqServer = s.traeDBReqServerDeBD(skmt)
reqManager.Initialize(Me, DBReqServer)
timerRecordatorio.Initialize("timerRecordatorio", 10 * 1000)
timerRecordatorio.Enabled = True
Log($"Starter - |${DBReqServer}|"$)
End Sub
@@ -159,4 +163,24 @@ Sub JobDone(Job As HttpJob)
'Verificamos que el usuario guardado en BD sea VALIDO.
End If
End Sub
Private Sub timerRecordatorio_Tick
'10:30, 13:00 y 15:30
' Log($"${DateTime.GetHour(DateTime.now)}:${DateTime.GetMinute(DateTime.now)}"$)
Log("Revisando la hora - UltimoRecordatorio: " & ultimoRecordatorio)
If ultimoRecordatorio <> DateTime.GetHour(DateTime.now) & DateTime.GetMinute(DateTime.now) Then
If (DateTime.GetHour(DateTime.now) = 13 And DateTime.GetMinute(DateTime.now) = 0) _ 'Recordatorio de las 13:00
Or (DateTime.GetHour(DateTime.now) = 14 And DateTime.GetMinute(DateTime.now) = 0) Then 'Recordatorio de las 14:00
Log("¡¡MANDAMOS RECORDATORIO!!")
If Not(B4XPages.GetManager.IsForeground) Then
Subs.notiHigh("¡¡ATENCION!!", "Recuerda enviar tu venta.", Main)
Else
If B4XPages.MainPage.IsInitialized And B4XPages.MainPage.pantallaActual.IsInitialized Then
B4XPages.MainPage.recordatorio.agregaPanelRecordatorio(B4XPages.MainPage.pantallaActual)
End If
End If
ultimoRecordatorio = DateTime.GetHour(DateTime.now) & DateTime.GetMinute(DateTime.now)
End If
End If
End Sub