1.实现pdf的阅读是一位大神给我说的,
因为Android不能像ios一样直接内置打开pdf,所以只能通过手机上自带的可以打开pdf的应用,这样也就是通过第三方的应用实现的,主要代码附上:
1》下载当前的文件的公共类
public class Downloader implements Callable<File> { protected int connectTimeout = 30 * 1000; protected int readTimeout = 1 * 1000 * 1000; protected int speedRefreshInterval = 500; protected byte[] buffer; private URL url; private File file; private float averageSpeed; private float currentSpeed; public Downloader() { buffer = new byte[8 * 1024]; } public void setUrlAndFile(URL url, File file) { this.url = url; this.file = file; this.averageSpeed = 0; this.currentSpeed = 0; } public URL