17/9/23 - Permisos de notificacion y timeout

- Se puso codigo para que al iniciar la aplicación pida el acceso a notificaciones.
- Se cambió el timeout por default a 11 segs.
This commit is contained in:
2023-09-17 17:14:02 -06:00
parent 1bbd6d2653
commit 24ab38a661
5 changed files with 14 additions and 6 deletions

View File

@@ -41,9 +41,10 @@ Sub Service_Create
End Sub
Sub Service_Start (StartingIntent As Intent)
Log("Monitor Start")
Service.StopAutomaticForeground 'Call this when the background task completes (if there is one)
Service.StartForeground(nid, s.CreateNotification("..."))
StartServiceAt(Me, DateTime.Now + 1 * DateTime.TicksPerMinute, True)
StartServiceAt(Me, DateTime.Now + 10 * DateTime.TicksPerMinute, True)
reqManager.Initialize(Me, Starter.DBReqServer)
Timer1_Tick
If logger Then LogColor("*************** Monitor Iniciado 👍🏽 **********", Colors.red)
@@ -55,6 +56,7 @@ End Sub
Sub Timer1_Tick
' Log("Next run " & DateTime.Time(DateTime.Now + Interval * 1000))
' Log("Monitor Timer_Tick")
If Starter.monitorActivo Then
DateTime.DateFormat = "dd/MM HH:mm:ss"
If B4XPages.IsInitialized Then B4XPages.MainPage.l_ultimoPing.Text = $"Último ping: ${DateTime.Date(DateTime.now)}"$