Android Question dirrootexternal access in Android 11

As you probably know, in Android 11, memory access is not possible through RunTime.
What to do to get memory access in Android 11 in b4a?
I do not have Android 12 to check if there is such a limit in Android 12? In general, give me the code that allows memory access in all possible versions of Android.
 

agraham

Expert
Licensed User
Longtime User
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
There is no such thing. You need to understand the new limits and the flow.

Example of some of the relevant features is available here: https://www.b4x.com/android/forum/t...e-and-load-external-files.132731/#post-838166
1.PNG

I downloaded your source but it gives such an error. I have also activated the Java Object Library
 
Upvote 0
Excuse me, Earl, I'm really in trouble, help me.
Now I want to copy a file to the android / data path. In Android versions, lower than 11 is not a problem, but in Android 11, it gives a force close, although I get access to the memory on a rental basis. Please tell me clearly what to do.
How can I remove this restriction in Android 11?
Thanks for your tips
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
How can I remove this restriction in Android 11?
I'm afraid that you can't, even using the new MANAGE_EXTERNAL_STORAGE permission, which isn't permitted in the Play Store for most apps.

From
Android 11 storage FAQ. First introduced in Android 10, scoped… | by nandana | Android Developers | Medium
For these cases, we have added the MANAGE_EXTERNAL_STORAGE permission to give access to all files on external storage, except the Android/data and Android/obb directories. To learn more about related Google Play guidelines, read the updated policy from the Policy Help Center.
my boldening
 
Upvote 0
I reviewed your source, it was excellent and very helpful in its kind. But I do not want the user to choose the file path to save, I want to save a file after loading via httpjob in Dirrootexternal and the Android / Data folder.
This request of mine has been well fulfilled in Android other than 11 and some Android 10. But on some Android 10 and all Android 11, the app gives force close.
I have been trying to fix this problem in Android 11 for several weeks, but I did not find an answer and here is the best reference I can ask my questions about b4a.
Earl, please help us, thank you
 
Upvote 0
Top