开发者

Android: use SQLite database on SD Card (not using internal Android Data Store at all)

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 A开发者_StackOverflow社区ndroid internal data store) because I want to frequently update the database file to provide more up to date information on info.db.

Thank you.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜