0

I installed my app on Android 11. But there is no folder under setting--> Storage--> Files--> Android--> data.

My app cannot create its own app-specific directory.

Is there any one have some suggestions?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Aria_Z
  • 13
  • 3

2 Answers2

0

On Android 11, apps cannot read or write to other apps' directories inside the Android/data folder.

Check the reference: Official Android Guide

Halil Sahin
  • 568
  • 1
  • 6
  • 25
0

You can directly create data in your own application directory, but you cannot create folders directly in other directories, because of security issues, it is not allowed to obtain the absolute path of the data.

App-specific directory on external storage

Starting in Android 11, apps cannot create their own app-specific directory on external storage. To access the directory that the system provides for your app, call getExternalFilesDirs().

Other reference: android-11-scoped-storage-permissions

Joe199382
  • 199
  • 1
  • 12