Android Question I need a simple, GPlay aproved, Folder Chooser

Cableguy

Expert
Licensed User
Longtime User
Hi guys,

I've been searching, and reading, and searching, and reading and searching...
and I find myself lost...

My app will need to save image files to a user selected folder, being it internal "external storage" or SD external Storage.
Typically the selected folder will ultimately be a mix of existing folders and a new final folder, defined by the user, So I will need not only to access/List/read but also to Write and create folders and subfolders.

Is there a lib, a CustomView, anything I can use without having to learn how the filesystem works and all its permissions?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
If you want to let the user save a single file then use the "SaveAs" method. It is simpler than you think. If you want to have full access to a folder then you need to use ExternalStorage which is more complicated to work with.
If it is not a Google Play app then you can set the targetSdkVersion to 29 with a special flag and have full access.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
If you want to let the user save a single file then use the "SaveAs" method. It is simpler than you think. If you want to have full access to a folder then you need to use ExternalStorage which is more complicated to work with.
I will need to Write files to/ List Files within/ Read files from /Create&Delete Folders in (full access?)
If it is not a Google Play app then you can set the targetSdkVersion to 29 with a special flag and have full access.
It will start as a NOT GPlay app, but it might become one along the way..
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I will need to Write files to/ List Files within/ Read files from /Create&Delete Folders in (full access?)
Yes, this can only be done with ExternalStorage.

I don't know whether it is relevant or not but another option is to store everything in the app internal folders and let the user save a zip file (or load it) use SaveAs / ContentChooser. This will be simpler.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Sad
I don't know whether it is relevant or not but another option is to store everything in the app internal folders and let the user save a zip file (or load it) use SaveAs / ContentChooser. This will be simpler.
Sadly I cannot.
But that brings another question...
How "large" is the app internal folder?
Can it store a few (many) hundred photos?
Like, can I store up to, let's say, 10GB? (As long as the device total storage allows it?)
Can I reserve such space?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

abonvici

Member
Licensed User
I will need to Write files to/ List Files within/ Read files from /Create&Delete Folders in (full access?)

It will start as a NOT GPlay app, but it might become one along the way..
Please, what do you mean for GPlay app, and in which way being a gplay app affect your app? Thanks a lot
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Specifically I've talked about requestLegacyExternalStorage that works with targetSdkVersion <= 29

 
Upvote 0
Top