Is it possible to choose a custom location for the sqlite database file?
If possible I want to store the database file in the memory card. And if user switches from one memory card to the other I want my application to use whatever version of the database file available on the card.
In SQLite, the sqlite3 command is used to create a new database. Syntax: sqlite3 DatabaseName. db.
By default your database is stored in data/data/your_package/databases
You can use SQLiteDatabase
openOrCreateDatabase
where you can supply the path to your custom database as your first argument.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With