Android 11 doesn't create app directory on external storage

KyluAce picture KyluAce · Sep 24, 2020 · Viewed 9.2k times · Source

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 ?

Answer

KyluAce picture KyluAce · Sep 24, 2020

Ok, I found a way to do it. Our app cannot create that folder but if we call for example getApplicationContext().getExternalFilesDir(""); Android will create that folder for us.

Quite stupid that if we want open dir which doesn't exist it will create it but when we want create it by ourself there is a problem. Android devs should makes our life easier but they making it more difficult with every update.