I am writing an application which makes heavy use of some JavaScript inside of WebView.
I have a function inside of a String that allows me to download a PDF that works fine on my desktop enviornment as long as my popup blocker is disabled.
So I disabled the popup blocker as described in some other posts that I have found then loaded my HTML and JS using the following code.
String js = "....";
WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.getSettings().setAllowFileAccess(true);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.getSettings().setSupportMultipleWindows(true);
myWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
myWebView.loadDataWithBaseURL("http://...", js, "text/html", "UTF-8", null);
Everything works fine except for my PDF.
I would expect to be give a new window, having allowed multiple windows and JavaScriptCanOpenWindowAutomatically.
Is there any other WebView setting I need to change to allow PDF's to be opened/viewed/downloaded?
Edit:
It should be noted that I am relying, for now, on whatever reader the user has on the system to take over the viewing of the PDF unless WebView has a built in way of viewing them.