Android Question ListFolders Not Work Under version 7

invocker

Active Member
Hi
B4X:
Sub ListFolders(dir As String)
Dim list_files As List
Dim lista_folders As List
lista_folders.Initialize
    list_files=File.ListFiles(dir)
    For i= 0 To list_files.Size -1
        If File.IsDirectory(dir, list_files.Get(i))=True Then
            lista_folders.Add(list_files.Get(i))
        End If
    Next
Return lista_folders
End Sub

Not list all files it return unInitialized list I think a Problem in the Dir
work only with DirInternal but DirRootExternal not work
I AddPermission("android.permission.WRITE_EXTERNAL_STORAGE")
But not work
 

invocker

Active Member
if only put a directory Like this "/storage/" It work and Get
|0012-24FA
emulated
sdcard0
sdcard1
self
//*******************
all empty Folder
 
Upvote 0
Top