Access to non-media files on Android 11+
On Android 11+, non-media files (like
txt,csv, ...) can be accessed
if and only if
- the text files are in the →
ASDor in the →Privatedir (i.e. were saved there), or- the text files are in one of the
Sharedfolders/Documentsor/Downloadand
these files were created by the app itself, orSAFis used, orMANAGE_EXTERNAL_STORAGE* permission is requested and granted.
*` This is not really an option, because an app that requests this permission will (most likely) not be allowed in Google's Play Store.
Note: Of course, all files in the assets can be read. However these are read only.
Access to media files on Android 11+
Without
READpermission, media files (like jpg, png, mp3, mp4, ...) can be read on Android 11+
if and only if
- these files are located in one of the
Sharedfolders (/Pictures,/DCIM,/Documents,/Download,/Music,/Movies) and were created by the app itself, or- these are in the ASD or
- these are in the Private directory.
With
READpermission, all media files can be read from all areas of the external storage (also from the root dir).Without
WRITEpermission, media files can be saved on Android 11+
if and only if
- these are stored in the
ASDor- these are stored in
Privatedir or- these are stored in one of the
Sharedfolders.
The
Privatedirectory is in the internal storage:/data/user/0/<packageName>/files/
Note: Since WRITE_EXTERNAL_STORAGE permission no longer exists on Android 11+, without MANAGE_EXTERNAL_STORAGE there is no way to save files outside of the ASD, Private dir or Shared folders. Or you must use SAF.
For more details see also here:




