Hello,
I'm having some errors trying to get permissions at runtime. The sequence is:
- The user starts the app
- The first routine is:
When the app starts, I have the sequence:
- The first permission window opens but over this there is a system message error indicating that "The System UI has stopped".
- If you grant the rp.PERMISSION_WRITE_EXTERNAL_STORAGE (allow to message box), then app close . Reopening, the app screen is blank. Debugging the code I can notice that the app is waiting for Activity_PermissonResult in the first event, what means that the rp.PERMISSION_WRITE_EXTERNAL_STORAGE was granted but the event wasn't raised...
The screens sequence follows:
Is there anything wrong with the code? Is it a problem with Android 8 and SDk 26?
I'm having some errors trying to get permissions at runtime. The sequence is:
- The user starts the app
- The first routine is:
B4X:
Sub Activity_Resume
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissonResult (Permission As String,Result As Boolean)
If Result = False Then AllPermissions = False
rp.CheckAndRequest(rp.PERMISSION_WRITE_CONTACTS)
Wait For Activity_PermissonResult (Permission As String,Result As Boolean)
If Result = False Then AllPermissions = False
rp.CheckAndRequest(rp.PERMISSION_READ_CONTACTS)
Wait For Activity_PermissonResult (Permission As String,Result As Boolean)
If Result = False Then AllPermissions = False
If AllPermissions Then
PermissionsOk
Else
Msgbox("Some required permissions weren't granted.","Restart the app")
End If
End Sub
When the app starts, I have the sequence:
- The first permission window opens but over this there is a system message error indicating that "The System UI has stopped".
- If you grant the rp.PERMISSION_WRITE_EXTERNAL_STORAGE (allow to message box), then app close . Reopening, the app screen is blank. Debugging the code I can notice that the app is waiting for Activity_PermissonResult in the first event, what means that the rp.PERMISSION_WRITE_EXTERNAL_STORAGE was granted but the event wasn't raised...
The screens sequence follows: