Android Question ExternalStorage: reach directory in DirDefaultExternal

andredamen

Member
Licensed User
Longtime User
B4X:
 DirFileWA = rp.GetSafeDirDefaultExternal("TossWhatsapp")

I want to read a file in the directory I have made with rp.GetSafeDirDefaultExternal. How can I get in that directory with ExternalStorage?

B4X:
    Storage.Initialize (Me, "Storage")
    FoldersStack.Initialize
    UpItem.Initialize

    Storage.SelectDir(False)
    Wait For Storage_ExternalFolderAvailable
    FoldersStack.Clear
    EnterFolder(Storage.Root)

With Externalstorage I can not reach this directory.
 
D

Deleted member 103

Guest
B4X:
 DirFileWA = rp.GetSafeDirDefaultExternal("TossWhatsapp")

I want to read a file in the directory I have made with rp.GetSafeDirDefaultExternal. How can I get in that directory with ExternalStorage?

B4X:
    Storage.Initialize (Me, "Storage")
    FoldersStack.Initialize
    UpItem.Initialize

    Storage.SelectDir(False)
    Wait For Storage_ExternalFolderAvailable
    FoldersStack.Clear
    EnterFolder(Storage.Root)

With Externalstorage I can not reach this directory.
To get a file from "rp.GetSafeDirDefaultExternal" the use of "ExternalStorage" is not necessary.
You can use the default functions.
 
Upvote 0

andredamen

Member
Licensed User
Longtime User
Thanks. I know, but I like the way ExternalStorage let the user see what is in the folder they choose. It looks that it must be possible whit ExternalStorage (Storage.SelectDir(False))
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
It looks that it must be possible whit ExternalStorage (Storage.SelectDir(False))
NO.
This is a private path of your app.
You don´t have access to this folder with the external storage class.

As written you can access the files in this folder directly.

What exactly are you trying to archieve?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I want the user to see a list of files in this folder so the can select a file the app must use.
What stops you to show them these files in a customlistview or whatever?
You can directly access these files. Even get a list of files with
 
Upvote 0
Top