You too prove with Android's official document reference where they mention this "No, you can of course write to one of the shared folders on Android 11+ without permission or user interaction."
We are doing this already since a few years
Just write a small test project and use the file component to store a file in /Download
No permission needed for newer devices
Taifun
Is this the official doc from Google? Build APK try on real real device android version 9, make a video recording of it and prove yourself that file is storing and getting without permission. Testing prevails theories. Theoretically your statement is correct regarding the permission.
There you go
Access your own media files
On devices that run Android 10 or higher, you don't need storage-related permissions to access and modify media files that your app owns, including files in the
MediaStore.Downloads
collection. If you're developing a camera app, for example, you don't need to request storage-related permissions to access the photos it takes, because your app owns the images that you're writing to the media store.
Taifun
for PDF we are on thread of an extension which read/writes PDF.
Is this official doc related to reading/writing PDF from/to shared storage?
This official doc talks about media files, however pdfs are non media files
We already have an excellent guide here
A pdf is a non media file and can be stored in shared storage without further permissions on newer devices
You do not seem to have much experience, else you would not question this... just try it yourself and you will see...
Taifun
Nobody is perfect! If you have experience in something someone has experience in different things. That is okay for all By the way shared storage has no connection with my extension, the topic ran out of the topic.
It is called /Download and NOT Downloads
And it is dependent on the file type: images, audio, video or non media files
See again the overview graphic at Some basics on Android storage system
For example you can't store a non media file in /Pictures
Taifun
No.
What is not correct in that statement? Except typo mistake.
Yes /Download folder for other files except pictures, video and audio.
What exactly are you trying to say?
You can store images, audio and video files also in the /Download folder
Taifun
Folder name is not /Downloads, it's /Download
If file is not audio, video, picture then the shared storage for that file is /Download folder this is what I am saying.
To be precise, on Android 11+ a non-media file can only be saved in:
- /Documents and/or
- /Download.
A media file (video) can only be stored in
- /Movies
- /Documents,
- /Download - and only with FileScope=Legacy:
- /Pictures,
- /DCIM (last two don't work with FileScope=Shared -> bug!)
A media file (image) can only be stored in:
- /Pictures,
- /DCIM,
- /Documents,
- /Download.
A media file (audio) can only be stored in:
- /Music,
- /Documents,
- /Download.
and of course in subdirectories of these Shared folders.
Perfect