Android Question I Need Access

boten

Active Member
Licensed User
Longtime User
Here's my problem:

My App (dogood) creates files (text,picture, sound, etc...)
I want the owner of the app to be able to browse, edit, view,play, delete the files freely (NOT while using the App)

In order to achieve this the app saves the files it creates in the "safe" external:

B4X:
Dim rp As RuntimePermissions
MyDir=rp.GetSafeDirDefaultExternal("")


and the user could use his file manager to do whatever he wants with the files in:
/storage/emulated/0/Android/data/boten.dogood/files

Then came Android 11!!!
The GetSafeDirDefaultExternal("") (/storage/emulated/0/Android/data/boten.dogood/files)
is no longer available to users.
Also, File.DirRootExternal (/storage/emulated/0) is not available to the app.

My older apps (created before android 11) could even create the folder and store files in
/storage/emulated/0/appname

How can I create & write on a folder that is accessible to the user. Preferably on the root (/storage/emulated/0/dogood)
 

boten

Active Member
Licensed User
Longtime User
Just ignore my question!
getting too old!!!
forgot:
B4X:
rp2.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, result2 As Boolean)
 
Upvote 0
Top