Android Question Permissions in B4XPage

Sergey_New

Well-Known Member
Licensed User
Longtime User
I'm trying to set permission in the Main module. The permission is set, and then I need to create a folder with the name of the application. The folder is not created.
Main:
Sub Activity_Create(FirstTime As Boolean)
    Dim pm As B4XPagesManager
    pm.Initialize(Activity)
    rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
    Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
    If Result Then
        File.MakeDir(File.DirRootExternal, "MyPages")
    Else
        Log("No permission!")
    End If
End Sub
What can I do?
Example attached.
 

Attachments

  • MyPages.zip
    9.4 KB · Views: 111
Last edited:
Top