I have an Android application that creates a SQLite DB and populates it with some data.
How do I save this database to a file so it can be shipped with another application?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can access the SQLite database file from the DDMS percpective of Eclipse when the device is connected, it is stored with your application’s files in /data/data/package_name/databases.
There is a guide on how to find and replace a database by a preset file:
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
Or you can just create an SQL command dump, and make it execute on first launch is initialized – however it will be realy time consuming.