Android Question STORING DATA IN A DIRECTORY - Resolved with thanks

Midimaster

Active Member
Licensed User
you are right... the four given directories already exist. Three of them are created at the moment, when you installed a app:

File.DirInternal, File.DirAssets
These two are only avaiable from your app. Others apps cannot read or write. The user cannot find in in his Smartphon's "My Files" . DirAssets is only a virtual directory, that help you you read file you packed into the APK. Of course it is READ-ONLY

The DirInternal you should use to store datas that your app needs for internal purposes. When the app is closed or paused the datas are still there. So this is the best place to save datas you will need also the next day. Only your App can read and write to this directory. It is a "sandbox".

File.DirDefaultExternal is a directory, that was also automatically created, when you installed the app. It should be used for saving "public" datas. The user can find it as as sub-sub-sub-folder of his "MyFiles". The folder name and path is terrible and not easy to find for the user, because the package name was used to define the folders name.

File.DirRootExternal is the root directory of the smartphone. It's typical subfolder are "MUSIC", DOCUMENTS, "ALARMS", etc.. This is the directory the users are used to see when they open the "My Files". Here youz can reach all aviable files and folders of other apps as long as they are not hidden in it's File.DirInternal. At the moment Android starts to reglement the access to File.DirRootExternal and you will find a lot of posts here related to this.
 
Upvote 0
Top