can I open a read alone database from res/asset folder in android without copying to database folder

岁酱吖の 提交于 2019-12-23 05:11:57

问题


I want to open a database and read some values from asset or resource folder.I don't want to write any data to DB.since my db size is huge I cant copy it to database folder as it will consume lot of time and memory. Any help?


回答1:


Sorry, but this is not possible. SQLite cannot work with purely an InputStream, which is all you can get from an asset or raw resource. Remember that assets and resources are not files on the device — they are only files on your development machine.



来源:https://stackoverflow.com/questions/36060140/can-i-open-a-read-alone-database-from-res-asset-folder-in-android-without-copyin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!