Some basics on Android storage system

Thanks all for good support, I am happy with App-Specific Directory.
I used this extension, https://community.kodular.io/t/extension-to-download-file-s-to-asd-app-specific-directory-without-write-permission/96891/
Thank you so much for this extension also.

2 Likes

I’ve added a full overview of the Android storage system - Scoped / Shared Storage (targetSdk=30, Aug 2021) - at the end of my guide.

5 Likes

Please, can anyone add in a guide some examples of code to save and read the files In mobiles with sdk 29 and 30 in a conditional way?

1 Like

This doesn’t make sense at the moment as long as the targetSdk = 30 update has not been released. The file system has been completely changed in AI2 after “Scoped Storage” is mandatory from Aug 2021. And there are still a number of (serious) problems and bugs with AI2 (and Niotron as well).

That might also be why Kodular is waiting for the MIT team’s bug fixes, before releasing the targetSdk=30 update. And that’s a good decision in my opinion. Otherwise the confusion and the number of error / bug reports would get out of hand.

4 Likes

Thanks, @bodymindpower . Then, We will wait.

I have added another detail to my overview (top right, see pink box) and thus completed the overview.
(I hope. :wink:)

12 Likes
Unzip goes intfine
Incoming SDK 30 hotfix
How to move a pdf file to a specific folder in android > 10?
Displaying Image from "external_storage" not working in compiled apk
Bugs after the new update!
Image Viewer | Pinch to zoom | Double Tap to zoom | Animated Zoom
How can we refresh image in gallery?
How to Copy File from Assets to Internal Storage?
Taifunfile extension not working on Android 11 version
Taifunfile extension not working on Android 11 version
Help how to read csv
FileTools : Some tools to work with files
How to hide folder name in user's devices in pdf application
Image File storage path Reading file problem
[Android ≤ 10] How do I read from a file in Internal Storage instead of SD Card with file component?
Is WRITE permission needed to edit a file in the ASD?
Read image file located in ASD
Read image file located in ASD
How to copy file to device and then read by other app
Asd Files not showing in gallery
Read image file located in ASD
SAF: App Inventor implementation of Storage Access Framework
SAF: App Inventor implementation of Storage Access Framework
The File component doesn't work
ChartMakerPlus extension not working in Fenix 1.5.2 Release
Image File storage path Reading file problem
My application is not a file manager app
Files from assets to internal storage
Taifun File Extention [ Help Me ]
[Free] Video Layout | A powerful and easy to use video player with Arrangements
Where are my photos?
Want layout to pdf extension
Unable to access the files in the device memory
How to Copy multiple images from ASD folder to share folder
FileTools : Some tools to work with files
Tip for those who have APP on the playstore

Thanks a lot for this Guide image but I have some confusions.

  1. This Guide is working for all Android versions ?
  2. If I want to make non private external storage for ex.(storage/emulated/0/Myfolder) you write that it must be approved by Google what does it mean?
  3. What does this directory called ?(Android/media/com.whatsapp) And can we make this type of directory also like whatsapp make (if yes than which permission we need)
  4. Want more information about Non private external storage.
    @bodymindpower I want your help

@bodymindpower
I am using a image picker in my app that takes image from gallery and copy to ASD.
I am aware about SAF and its extension
Problem which i am facing is that i need to give separate tree access if i want to use image from DCIM and if i need from whatsApp folder.
As such in the extension i cannot give access to full storage in one access.
I have asked the question with extension developer, he told that i need to go ahead with multiple access
Is there any other way out for my problem?

the permission MANAGE_EXTERNAL_STORAGE must be approved by Google, see also Manage all files on a storage device  |  Android Developers

good question… I do not know… let me suggest to read the Android documentation… here is a start App data and files  |  Android Developers see also permissions - Android 11 Access other apps Data in Android/media - Stack Overflow
let us know, what you find out…

Taifun

Approve by Google? How to take approval is this means that google review our app and then if it’s approved.
What if I make app not for playstore??

Unfortunately I didn’t understand from android documentation that’s why I asked here

concerning the approval see also this link Use of All files access (MANAGE_EXTERNAL_STORAGE) permission - Play Console Help

then you can use that permission without approval from Google
however you have to add it into the manifest

Taifun

It is called: /Android/media/ (There is no special name for it.)

Yes, but you cannot write to it:

The same with a file extension from @Taifun or @vknow360.

So as I said you need SAF for this.

1 Like

Where is the problem to copy a media file from e.g. /Pictures or /DCIM to the ASD?
Why should you use SAF for that?

Can we read these directory ?

Is SAF able to do this ?

Important thing is how others apps are able to do these all commands like making directory read and write them

Just a last question :interrobang: . Can we make these type of independent directories of our app like this

No, not without special permission.
Btw, what are “independent directories”?

But, as I said (now for the third time), what about trying out something yourself?

1 Like

the question remains, how Whatsapp is able to read and write in directory /Android/media as far as I know without requiring additional permission from the user (at least I do not remember to have given additional permission to Whatsapp)…

Taifun

1 Like

Using MediaStore?