Permission check:
Next, I read the text file using the procedure loadFile(FileName)
It works in B4A.
If you place this code in the B4XMainPage module the code works.
If you place this code in the Main B4XPages module the code does not work.
I need to complete this procedure before opening B4XMainPage.
The permissions in the manifest are set.
How to do it right?
Main:
Private rp As RuntimePermissions
For Each permission As String In Array(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
rp.CheckAndRequest(permission)
Wait For Activity_PermissionResult (permission As String, Result As Boolean)
If Result = False Then
ToastMessageShow("No permission!", True)
Return
End If
Next
loadFile(FileName)
It works in B4A.
If you place this code in the B4XMainPage module the code works.
If you place this code in the Main B4XPages module the code does not work.
I need to complete this procedure before opening B4XMainPage.
The permissions in the manifest are set.
How to do it right?