I have an sqlite database I want to distribute with my application. It’s about 3mb. If I understand correctly, I can’t directly open it if it resides in my app’s /raw or /assets folder, right? We need to first copy it out of that directly as in:
Get the SQLite path within the Assets Folder
So my app will consume twice the disk space as it normally would? I don’t understand why it’s necessary to have the database file be in a particular folder?
Thanks
Yes. Technically, probably more, as your database is compressed inside the APK file.
It is not necessary for the database file to be in a particular folder. However,
assets/is a folder on your development machine; it is a part of the APK file on the device. Same goes for everything inres/raw/.BTW, I recommend
SQLiteAssetHelperfor copying the database out ofassets/.