Reputation: 189
Can somebody please give me some links / tutorials to using SQLite file thatis stored on a SD card? Not implementing the OpenHandler.
/SD CARD//info.db
I want to use an external SQlite database file (not use Android internal data store) because I want to frequently update the database file to provide more up to date information on info.db.
Thank you.
Upvotes: 11
Views: 28337
Reputation: 10485
I would recommend you NOT to put the database on the SD-card due to partly security issues (everyone who has physical access to the device and the SD-card, including all applications running on the device, will also have more or less full access rights to the database file) but also due to hardware issues (an SD-card has a limited lifespan as of the total number of write operations one can perform on it).
These questions are also discussed here: SQLite database on SD card
Upvotes: 8
Reputation: 12455
Have you tried using SQLiteDatabase.openOrCreateDatabase(String, SQLiteDatabase.CursorFactory)
? You can simply pass "/sdcard/info.db"
as the first and null
as the second parameter.
Upvotes: 18