Hi all.
I need to implement RuntimePermission ( SDK 23 ) .
I have the following situation
Now i want that when start application ask all permission. so i write in code this:
In this mode the customer have all Request Permission.
There is no faster way, instead of asking all these permissions ?
Such example in manifest or another way ?
Thank you
Marco
I need to implement RuntimePermission ( SDK 23 ) .
I have the following situation
Now i want that when start application ask all permission. so i write in code this:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim rp As RuntimePermissions
End Sub
....
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("lay_xx")
rp.CheckAndRequest(rp.PERMISSION_READ_PHONE_STATE)
End Sub
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
Log($"Permission: ${Permission}
Result: ${Result}"$)
Select Permission
Case rp.PERMISSION_READ_PHONE_STATE
If Result Then rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Case rp.PERMISSION_WRITE_EXTERNAL_STORAGE
If Result Then rp.CheckAndRequest(rp.PERMISSION_CALL_PHONE)
Case rp.PERMISSION_CALL_PHONE
If Result Then rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Case rp.PERMISSION_ACCESS_FINE_LOCATION
If Result Then rp.CheckAndRequest(rp.PERMISSION_READ_EXTERNAL_STORAGE)
Case rp.PERMISSION_READ_EXTERNAL_STORAGE
If Result Then rp.CheckAndRequest(rp.PERMISSION_RECORD_AUDIO)
Case rp.PERMISSION_RECORD_AUDIO
If Result Then permessi_accordati
End Select
End Sub
In this mode the customer have all Request Permission.
There is no faster way, instead of asking all these permissions ?
Such example in manifest or another way ?
Thank you
Marco