Apps read/write storage without asking permissions
I have noticed that some apps are accessing/reading/writing in the storage without asking for permissions. Note that I am not talking about apps' internal folder, but the shared storage located at /storage or /storage/emulated/0.
For example, browsers like Chrome, Brave, etc. can download files without asking for storage permission. While Firefox does have to gain permission before the download starts (I am aware that Chrome already has permission since it's built in, but Brave does not have it).
On the other hand, I have downloaded a video player called Just Video Player, it's simple and open-source, and I like it. It also does not ask for storage permission. I go to any file manager, click on a video file, select Just Video Player, and it starts playing. How does that happen?
I know I may be asking for information which is too technical for me or something, but I need to know.
When you open a file through a file manager, the receiving application is automatically granted access to that resource. Though the access is somehow limited (short lived) and may not work past app or device restart.
As an author of Just (Video) Player, I focus on simple working design where you don't need read permission except for some edge case (supporting some outdated apps).
You may check this comprehensible table for various types of access to files: https://developer.android.com/training/data-storage