4/1/2024 - Permisos

This commit is contained in:
2024-01-04 03:35:45 -06:00
parent aec2c705a2
commit 6fd36f54b4
2 changed files with 21 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ Version=12.5
#Region Project Attributes
#ApplicationLabel: FLP 2.0
#VersionCode: 1
#VersionName: 3.11.11
#VersionName: 4.01.04
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
@@ -105,6 +105,8 @@ End Sub
Sub Activity_Resume
chkPermisosUbicacion 'Permisos de ubicacion para Tracker
chkPermisosAlmacenamientoExterno
chkPermisosLeerLlamadas 'Permisos de telefono para registrar llamadas
chkPermisosEstadoTelefono
Subs.getPhnId
et_id.Text = Starter.devModel.Trim
getSSID
@@ -148,6 +150,7 @@ Sub b_pong_LongClick
Wait For WiFi_ScanDone (Results() As String, Count As Int)
End Sub
'Obtenemos permisos de almacenamiento.
Sub chkPermisosAlmacenamientoExterno
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
@@ -158,6 +161,7 @@ Sub chkPermisosAlmacenamientoExterno
End If
End Sub
'Obtenemos permisos de ubicacion.
Sub chkPermisosUbicacion
' If Starter.logger Then Log("Revisamos permisos de ubicación.")
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
@@ -170,6 +174,20 @@ Sub chkPermisosUbicacion
End If
End Sub
'Obtenemos permisos de llamadas.
Sub chkPermisosLeerLlamadas
Starter.rp.CheckAndRequest("android.permission.READ_CALL_LOG")
wait for Activity_PermissionResult(permission As String, result As Boolean)
Log("READ_CALL_LOG: " & result)
End Sub
'Obtenemos permisos de estado de telefono.
Sub chkPermisosEstadoTelefono
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
wait for Activity_PermissionResult(permission As String, result As Boolean)
Log("READ_PHONE_STATE: " & result)
End Sub
Sub getSSID
If wifi.isWifiConnected Then
Subs.ssid = wifi.WifiSSID