I want the user to open a file from the download folder. I use the following code
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout1")
RP.CheckAndRequest(RP.PERMISSION_READ_EXTERNAL_STORAGE)
Shared = File.Combine(File.DirRootExternal, "Download")
Log(Shared)
End Sub
Private Sub Button2_Click
Dim HL As List
HL.Initialize
HL = File.ListFiles(Shared)
For i = 0 To HL.Size-1
ListView1.AddSingleLine(HL.Get(i))
Next
End Sub
[CODE=b4x]
B4A + B4i example: https://www.b4x.com/android/forum/threads/b4x-texteditor-save-and-load-external-files.132731/#post-838166 List of classes or libraries that can be used to access secondary storages: ContentChooser (Phone libray) - allows the user to select a resource or file using external...
1. No permission is needed.
2. ExternalStorage will not work with the downloads folder on newer versions of Android.
3. Use ContentChooser as demonstrated in TextEditor example.