accessing .sqlite database (>1Mb size) in android

后端 未结 3 1948
陌清茗
陌清茗 2021-01-23 20:23

I am working on a library app and have books stored as .sqlite files. Each book\'s sqlite database file is about 10MB in size. I first tried to put it in assets folder and then

3条回答
  •  长发绾君心
    2021-01-23 20:46

    There is a workaround to this issue. The limitation of 1MB is only for SQLite files and not for other file types. Rename your SQLite file as something like "db.mp3" and then when your app starts, you can copy this file to your SD Card and use it as a normal SQLite file from SD card. I have implemented this solution and it works perfectly fine on all Android versions.

提交回复
热议问题