How to access SQLite Database created in SQLiteManager in Android App?

3.4k views Asked by At

I have a database created in SQLiteManager from Mozilla, I exported it and saved the .sql file in assets folder, now how do I read or make entries in this database from my android app? How should my DatabaseHandler( which extends SQLiteOpenHelper) should look like?

1

There are 1 answers

3
Nikolay Elenkov On

You can't access it directly from the assets/. You need to copy it to a file (internal or external storage) the app can access directly. Then open as usual.

More details here: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/