简体   繁体   中英

How to store big text resources in Android (up to 100mb)

I want to make text reader in Android. There are 20000 text files with summary size of, maybe, up to 100mb. The application must be able to read the texts offline. I do not know how to implement it. If we put all the texts in the apk-file, it will turn out giant-sized (4mb of apk + 100mb of text). It can be more convenient to store the text in a single file? Maybe I can use archives? Maybe I can use a swap file after installing? Help needed! Thanks!

I created an app with 300 Mb text. I uses SQlite DB because i needed fast search in my case. Then I archived DB, put in assets and extract on first run. Result archived DB was 56 Mb. In your case you may do the same. But you don't need use a sqlite if you don't need search, relation data etc. Is not so much choice really, database or text files depending on the requirements

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM