Download Doc/PDF from the internet and save to internal memory [closed]

微笑、不失礼 提交于 2020-01-12 01:46:49

问题


I am attempting to make an application that will primarily open and read a predetermined set of documents that I have. The original idea was for all the documents (about 40 equaling MB) to be copied into the user's internal memory (/data/data/(appname)/files) on first run or install. I realize that this may be a bad idea with some phones having limited space in the internal memory. I now am thinking of changing my app idea to download a file from a stored location on the internet and have it saved to the internal memory. This way the user can view only the needed documents, severely shaving down the size of the memory needed. I have seen some code snippets of how to download files, for this instance I want to use a PDFs, but I cannot find a way to save them to the internal memory (/data/data/(app)/files). I have seen many snippets dealing with databases but I need to save PDFs and doc files.

Any help on how to: 1. download a doc/PDFs file from the internet, 2. immediately save the file to internal memory, 3. launch the doc/PDFs from the internal memory using a 3rd party program (example being adobe reader).

I appreciate the help!

来源:https://stackoverflow.com/questions/10378895/download-doc-pdf-from-the-internet-and-save-to-internal-memory

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