Lately I updated my smartphone to Android 11 and I noticed that one of my app crashes on creating directory on external storage. I have read Android 11 documentation and here we are Starting in Android 11, apps cannot create their own app-specific directory on external storage
. Quite strange because when I open Android/data dir there are a lot of applications folders so there is possibility to do it or maybe there are folders created by apps before updates ?
To protect user privacy, on devices that run Android 11 or higher, the system further restricts your app's access to other apps' private directories.
Please go to Android system settings, find storage section, click it. From the storage page, find "Files" item, and click it. If there are multiple file managers to open it, please make sure to choose "Open with Files" to open it, which is the system file manager app.
Using scoped storage with FUSE. Android 11 or higher supports Filesystem in Userspace (FUSE), which enables the MediaProvider module to examine file operations in user space and to gate access to files based on the policy to allow, deny, or redact access.
getApplicationContext().getExternalFilesDir("");
will give you your app's specific external storage directory and no other apps will be able to access its contents. As i believe, what was meant by saying
Starting in Android 11, apps cannot create their own app-specific directory on external storage
is that no other app-specific directory can be created on external storage but the one forementioned. I found this article somewhat useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With