- VERSION 4.08.26

- Se movió la solicitud de permisos al final del "Appear" de Mainpage para que no estorben con la inicializacion del DBReqManger
This commit is contained in:
Jose Alberto Guerra Ugalde
2024-08-26 10:05:52 -06:00
parent 4f86be6457
commit a50d2319d1
3 changed files with 23 additions and 23 deletions

View File

@@ -203,26 +203,8 @@ Sub B4XPage_Appear
End If
Dim ph As Phone 'Get Id Device
Dim DeviceID As String = ph.GetSettings("android_id").ToUpperCase
LogColor($"////////////////// DeviceID: ${DeviceID} ////////////////// "$, Colors.Blue)
LogColor("Revisa permisos Phone_State", Colors.Green)
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
IMEN.Text = Phn.GetDeviceId
IMEI = Phn.GetDeviceId
LogColor($"////////////////// IMEI: ${IMEI} ////////////////// "$, Colors.Blue)
IMEI="" 'Pruebas
End If
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
StartService(Tracker)
Log("Start Tracker")
Else
ToastMessageShow("No permission", True)
End If
If Not(reqManager.IsInitialized) Then
Log(Starter.server)
Log("MAINPAGE - " & Starter.server)
reqManager.Initialize(Me, Starter.server)
End If
tgl.Initialize()
@@ -261,6 +243,24 @@ Sub B4XPage_Appear
'Obtenemos el usuario registrado
' CallSubDelayed(FirebaseMessaging, "SubscribeToTopics")
dameUsuario
LogColor($"////////////////// DeviceID: ${DeviceID} ////////////////// "$, Colors.Blue)
LogColor("Revisa permisos Phone_State", Colors.Green)
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
IMEN.Text = Phn.GetDeviceId
IMEI = Phn.GetDeviceId
LogColor($"////////////////// IMEI: ${IMEI} ////////////////// "$, Colors.Blue)
IMEI="" 'Pruebas
End If
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
StartService(Tracker)
Log("Start Tracker")
Else
ToastMessageShow("No permission", True)
End If
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.

View File

@@ -176,12 +176,12 @@ Module9=C_NoVenta
NumberOfFiles=60
NumberOfLibraries=31
NumberOfModules=21
Version=12.5
Version=12.8
@EndOfDesignText@
#Region Project Attributes
#ApplicationLabel: Salma Venta
#VersionCode: 1
#VersionName: 3.01.13
#VersionName: 4.08.26
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False

View File

@@ -46,7 +46,7 @@ ModuleClosedNodes0=
ModuleClosedNodes1=5,7,8,9,10,11,12,13,14
ModuleClosedNodes10=
ModuleClosedNodes11=6
ModuleClosedNodes12=1,2,3
ModuleClosedNodes12=2,3
ModuleClosedNodes13=
ModuleClosedNodes14=
ModuleClosedNodes15=
@@ -64,6 +64,6 @@ ModuleClosedNodes6=
ModuleClosedNodes7=
ModuleClosedNodes8=
ModuleClosedNodes9=
NavigationStack=Subs,traeProdIdDeBD,1072,0,C_Principal,B4XPage_Created,299,0,C_Principal,Subir_Click,538,0,C_Principal,B4XPage_Appear,319,3,C_Principal,B4XPage_CloseRequest,1597,0,C_Principal,cargar_Click,819,0,C_Principal,connecta_Click,1654,5,Diseñador Visual,principal.bal,-100,1,C_Principal,JobDone,1527,6,B4XMainPage,i_engrane_Click,602,0,Starter,Process_Globals,14,0
NavigationStack=C_Principal,JobDone,1527,6,B4XMainPage,i_engrane_Click,602,0,Starter,Process_Globals,14,0,Main,Process_Globals,21,0,Main,Globals,25,0,C_Principal,b_mapa_Click,1681,0,C_Principal,Class_Globals,223,0,C_Principal,B4XPage_Appear,304,3,C_Principal,connecta_Click,1622,6,B4XMainPage,B4XPage_Appear,243,3
SelectedBuild=0
VisibleModules=19,2,20,12,13,4,21,17