Android Question Database file

lucdrb

Active Member
Licensed User
Longtime User
Hi,

I use this command : SqLite.Initialize (File.DirInternal,"whos_who.db3", False).
the database is already created with some fields.
In the program I create and update fields.

Could you tell me in wich directory (file?, object? or another?) should I've to place the database whos_who.db3 and if File.DirInternal is the best place to store it and to retrieve data?

Thanks

Luc
 

HotShoe

Well-Known Member
Licensed User
Longtime User
Place your db file in the files directory. You will need to copy it to file.dirinternal when the app runs for the first time (check to see if it exists and copy if it does not). file.dirinternal is a good choice for read/write access and to keep the file secure on unrooted deices. For reference, file.dirinternal will be:
/data/data/your.app.name/files

If you do not need to write to the db, you can leave it in the file.dirassets directory (don't copy it), but this is rarely the case.

--- Jem
 
Upvote 0
Top