Some basics on Android storage system

For more details see here:

1 Like

It is only accessible to apps and you can’t view it unless you root your device.

Except internal storage other storage(either phone storage or sdCard) spaces fall in this category.
There are two types of it:

  • Primary External Storage :- It is the phone storage.
  • Secondary External Storage :- It is the sdCard.
4 Likes

And what about the otg…

OTG also come in Secondary External Storage category but is managed by USB Manager.

1 Like

If supose we direct the app to download a file ,so by default it gets stored in the phone storage.[ By using this directory file:///storage/emulated/0/ …]
But if the phone storage is full will the app automatically detect and change its directory to External SD Card or we have to manually write the blocks for that ??

1 Like

See here:

1 Like

Oh I see,
So we have to do it manually ?

1 Like

Yes, before you can access the removable SD card, you first have to get the path.

1 Like

ok thx! ! !

Note: I just updated this guide.

3 Likes

I couldn’t do it myself :upside_down_face:, but @Peter made this topic a → Wiki.

2 Likes

How can I download files to this directory.

15 posts were split to a new topic: How to secure download files?

As far as I know, that is not possible. Only the File component can write in this dir.

1 Like

Maybe he can download files in asd and copy them to private dir.

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.

6 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.