Raw Resources file filepath

Do I have a database placed in an unprocessed folder and do I need to load the database path when apk is installed? Where is it? in / data / data / package_name / FILE? I do not see this?

I am working with an existing sqlite database.

+2
source share
2 answers

It has no way: it is a resource, so you need to reference as such using getResources() .

You should copy it to /data/data/YOUR_APP_FOLDER/databases/YOUR_DB.db for the first time

You can follow this guide: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

+2
source

Files in the raw folder are packed into the applicationโ€™s APK file. To open one of these files, use getResources().openRawResource(int id) .

+1
source

All Articles