File storage location on device SD

enonod

Well-Known Member
Licensed User
Longtime User
I am confused (when aren't I?) about file storage locations which may be down to loose? terminology.
My understanding is that the device usually has memory (Ram) and internal storage (memory not disk drive) organised as SD (internal).
The above description does not 'seem' to distinguish between memory and internal SD.
Because I wish to store files on SD (internal) in case there is not an SD (external) fitted (which I know I can test for), I have been unable to determine if the reference above...
These two folders are stored in the main memory
...should actually say "SD (internal)" rather than give the impression it is "Ram" being used by the app, simply because I have been unable to locate such folders or my app on SD (internal), there seems to be some 'apparent' duplication in folder names surrounding accessing SD (internal).

Will somebody please make it clear to me where my app is internally stored and where my data files will be stored (internally) so that I may find them. Does DirExternal mean external to Ram or external to the normal total memory internal i.e. SD (external)?
 
Last edited:

agraham

Expert
Licensed User
Longtime User
From the Android docs.

File.DirRootExternal
DirDefaultExternal returns the path "/Android/data/" & yourpackageName & "/files/" in DirRootExternal. DirRootExternal is shared by all programs on the device.

File.DirInternalCache
In devices with a removable SD card for external storage this is located in internal storage of some sort so as to always be available.

File.DirInternalCache
Returns an absolute a directory that is private to your application only. The data you write is directly stored in this directory and is not accessible by any other application. It holds your application files.
In devices with a removable SD card for external storage this is located in internal storage of some sort so as to always be available.
 
Upvote 0

enonod

Well-Known Member
Licensed User
Longtime User
Thank you very much for your time and, as always, precise location of what is required.

I have assumed the word cache should not appear above the final quote.
I have assumed that by 'storage of some sort' that it is irrelevant to know that, probably because...
...and is not accessible by any other application.
...other application includes a file explorer, because I cannot find any directory, as I can with 'DirDefaultExternal', on the path you have indicated.

I would be obliged for a link to these particular Android Docs which I assume contains a wealth of information that might save me asking.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
I would be obliged for a link to these particular Android Docs which I assume contains a wealth of information that might save me asking.
They are from the individual method documentation in the Android Environment and Context classes. The method names do not necessarily map directly to Basic4android names.

You can read Saving Files | Android Developers
 
Upvote 0

enonod

Well-Known Member
Licensed User
Longtime User
Thank you very much.
 
Upvote 0

Shadow&Max

Active Member
Licensed User
Longtime User
This question has been moved to a new post as per Erel's suggestion...
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…