Download file from web view.

Hello there,

We are displaying some website inside a webView within the app. The page has a link (actually a form that is posted) to download a pdf file, it works fine on IOS (It opens the pdf inside the web view). However, on android, nothing actually happens (web view listeners are actually fired, so there’s something happening) and we are not able to get the file open nor download.

Is there anything that can be done about this?

Are you definitely using native.newWebView or the older popup?

Yes, definitely native.newWebView.

The page renders fine, CSS and javascript also works fine. The issue comes when it needs to download a file.

The procedure to download a file is actually a post request to the server with some data, the server uses GZIP content type in the response if the client sends accept: gzip, and I think those are the only variables.

Did anyone actually manage to download any file from an android device within a web view?

Can you cause the application to do the downloading for you, rather than handle it within the web view?

No can’t do that since we still need the web functionallity. The download is just a part of all the purposes of the web view.

Are you definitely using native.newWebView or the older popup?

Yes, definitely native.newWebView.

The page renders fine, CSS and javascript also works fine. The issue comes when it needs to download a file.

The procedure to download a file is actually a post request to the server with some data, the server uses GZIP content type in the response if the client sends accept: gzip, and I think those are the only variables.

Did anyone actually manage to download any file from an android device within a web view?

Can you cause the application to do the downloading for you, rather than handle it within the web view?

No can’t do that since we still need the web functionallity. The download is just a part of all the purposes of the web view.