Hello,
I want the user to open a file from the download folder. I use the following code
I added this to the Manifest:
The listview shows only folders, no files.
Where do I go wrong?
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]
I added this to the Manifest:
B4X:
AddManifestText(<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
The listview shows only folders, no files.
Where do I go wrong?