开发者

Downloading files via a webView

开发者 https://www.devze.com 2023-01-10 06:42 出处:网络
I am currently implementing a webview that uses the default behavior of opening the browser. When the page loads in the browser and I click the download link that is on the page that was loaded, the d

I am currently implementing a webview that uses the default behavior of opening the browser. When the page loads in the browser and I click the download link that is on the page that was loaded, the download starts, and quickly fails. I guess its an unsupported file type. How would I go about setting the WebView so that I may handle when 开发者_StackOverflowa user downloads a file, and process the file myself? The reason I am going through a webview is that using httpclient, I was unable to spoof the headers after trying unsuccessfully for 30 or so hours. So what I would like to be able to do is handle the saving, and unzipping of the file myself. Can anyone write me some code to get started?

Thanks a million.

0

精彩评论

暂无评论...
验证码 换一张
取 消