通过显示在Android POST响应/下载收到一个PDF文件 [英] Display a PDF file received via POST response / download on Android

查看:358
本文介绍了通过显示在Android POST响应/下载收到一个PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android应用我的工作由一个网页视图的。

在在web视图的链接之一的点击,一个AJAX POST请求时收到一个PDF文件。

目前,在点击PDF下载链接(在web视图),无PDF文件下载。

我试图拦截WebResourceResponse shouldIntercpetRequest()的请求,但不可能访问响应头/ PDF数据。

必须采取哪些方法来显示在Android设备上的PDF格式,通过上述方法获得?

任何帮助将是AP preciated。

感谢。


解决方案

  

必须采取哪些方法来显示在Android设备上的PDF格式,通过上述方法获得?


假设你已经有了PDF资料和你在一起,意图可以用来发射将使用的PDF数据的PDF应用程序。结果
请参阅以下链接了解更多:结果
打开从你自己的(意向)另一个应用程序

The android app I am working on consists of a webview.

On click of one of the links in the webview, an AJAX POST request is made to receive a PDF file.

At the moment, on clicking the pdf download link (on the webview), no pdf file is downloaded.

I tried to intercept the request by WebResourceResponse shouldIntercpetRequest(), but couldnt access the response header / pdf data.

What approach must be taken to display the pdf on an android device, received via the above method ?

Any help would be appreciated.

Thanks.

解决方案

What approach must be taken to display the pdf on an android device, received via the above method ?

Assuming that you already have the PDF data with you, Intent can be used to launch the PDF application which will use the PDF data.
See the following link for more:
Open another application from your own (intent)

这篇关于通过显示在Android POST响应/下载收到一个PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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