Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/193.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 不下载动态页面中的PDF_Android_Download_Android Webview - Fatal编程技术网

Android 不下载动态页面中的PDF

Android 不下载动态页面中的PDF,android,download,android-webview,Android,Download,Android Webview,我有一个动态页面,就像, 包含一个.pdf文件, 当我在android本机浏览器中加载此页面时,我在日志中看到了这一点- 03-25 19:30:50.421: V/BrowserActivity LOG(22302): BrowserActivity onDownloadStart() Begin - url http://somesite.com/letters/pages/document.jsf contentDisposition - attachment: filename=Let

我有一个动态页面,就像, 包含一个.pdf文件, 当我在android本机浏览器中加载此页面时,我在日志中看到了这一点-

03-25 19:30:50.421: V/BrowserActivity LOG(22302):  BrowserActivity onDownloadStart() Begin - url http://somesite.com/letters/pages/document.jsf contentDisposition - attachment: filename=Letter.pdf mimetype - application/pdf
我想下载这个“Letter.pdf”,这是一个附件,正如android日志所说,我已经用一个DefaultHTTPClient实现了downloadListener,但是它下载document.jsf页面而不是.pdf


请告诉我需要提供哪部分代码。

Android有一种非常特殊的处理下载的方法。也就是说,它将下载请求转交给Android DownloadManager,后者基本上根据第一个请求发送第二个请求

详情如下: