Android Question [SOLVED] RuntimePermissions Programming Mistake

mmieher

Active Member
Licensed User
Longtime User
Why is this a "programming mistake"? Big bold line squiggled.

Also not working, but that will be a New Thread!

B4X:
Sub Process_Globals
      
    Private rp As RuntimePermissions
    'Private Shared As String
    Public PMCDirectory As String
  
' ...

Sub GetConfigFile() As ResumableSub
    Dim FirstConfig As Boolean
  
    Dim i As Int
  
    '    Permissions --------------------------------------------------------------------
    PMCDirectory = rp.GetAllSafeDirsExternal("")
  
    rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
    Wait For Activity_PermissionResult (Permission As String,Result As Boolean)
 

mmieher

Active Member
Licensed User
Longtime User
Why is this a "programming mistake"? Big bold line squiggled.

Also not working, but the will be a New Thread!

B4X:
Sub Process_Globals
     
    Private rp As RuntimePermissions
    'Private Shared As String
    Public PMCDirectory As String
 
' ...

Sub GetConfigFile() As ResumableSub
    Dim FirstConfig As Boolean
 
    Dim i As Int
 
    '    Permissions --------------------------------------------------------------------
    PMCDirectory = rp.GetAllSafeDirsExternal("")
 
    rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
    Wait For Activity_PermissionResult (Permission As String,Result As Boolean)


Bold did not work. the PMCDirectory = rp.GetAllSafeDirsExternal("") statement is a "mistake". Object converted to String.
 
Upvote 0
Top