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

前端 未结 2 967
臣服心动
臣服心动 2020-12-08 11:53

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 wa

相关标签:
2条回答
  • 2020-12-08 12:35

    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 讨论(0)
  • 2020-12-08 12:52

    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.

    0 讨论(0)
提交回复
热议问题