This commit is contained in:
cvaldes1201
2024-02-26 10:59:00 -06:00
parent a32149d755
commit e67a1f20c4
12 changed files with 1657 additions and 156 deletions

View File

@@ -29,6 +29,9 @@ Sub Process_Globals
Dim logger As Boolean = False
Dim marcaCel As String = ph.manufacturer
Dim muestraProgreso = 0
Private BTAdmin As BluetoothAdmin
Dim MAC_IMPRESORA As String
Public BluetoothState As Boolean
End Sub
Sub Service_Create
@@ -36,7 +39,7 @@ Sub Service_Create
'This is a good place to load resources that are not specific to a single activity.
gps.Initialize("GPS")
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics") 'Para Push FirebaseMessaging
BTAdmin.Initialize("admin")
Timer1.Initialize("Timer1", Interval * 1000)
Timer1.Enabled = True
' 'Para los Logs
@@ -47,6 +50,13 @@ Sub Service_Create
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics") 'Para Push FirebaseMessaging
End Sub
Private Sub BTAdmin_StateChanged (NewState As Int, OldState As Int)
If logger Then Log("BT state changed: " & NewState)
BluetoothState = NewState = BTAdmin.STATE_ON
' StateChanged
End Sub
Sub Service_Start (StartingIntent As Intent)
Service.StopAutomaticForeground 'Starter service can start in the foreground state in some edge cases.
Subs.revisaBD