从互联网下载Doc / PDF并保存到内部存储器 [英] Download Doc/PDF from the internet and save to internal memory

查看:175
本文介绍了从互联网下载Doc / PDF并保存到内部存储器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图提出一个应用程序,主要打开和读取我拥有的一组预定文件。最初的想法是在首次运行或安装时将所有文档(大约40等于MB)复制到用户的内部存储器(/ data / data /(appname)/ files)中。我意识到这可能是一个坏主意,一些手机内部存储空间有限。我现在考虑改变我的应用程序想法,从互联网上存储的位置下载文件,并将其保存到内部存储器中。这样,用户只能查看所需的文档,严重地削减所需内存的大小。我已经看到了一些如何下载文件的代码片段,对于这个例子,我想使用一个PDF,但是我找不到一种将它们保存到内存(/ data / data /(app)/ files)的方法。我看到许多处理数据库的代码段,但是我需要保存PDF和doc文件。任何帮助如何:1.从互联网下载文件/ PDF文件,2.立即将文件保存到内部存储器中,3.启动文档/ PDF文件。

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.

使用第三方程序从内部存储器(例如adobe reader)。

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).

我感谢帮助!

推荐答案



  1. 从互联网下载文档/ PDF文件,2.立即将文件保存到内部存储器,


为此,您可以尝试此示例: Example1 Example2

For that you can try this example : Example1 and Example2



  1. 从内部存储器启动文档/ PDF一个第三方程序(例如adobe reader)。


Answer1 Answer2

这篇关于从互联网下载Doc / PDF并保存到内部存储器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆