Code
webView = (WebView) findViewById(R.id.webView);
webView.setWebViewClient(new WebViewClient());
webView.getSettings().setSupportZoom(true);
webView.getSettings().setJavaScriptEnabled(true);
String url = "http://www.pdf995.com/samples/pdf.pdf";
webView.loadUrl("https://docs.google.com/gview?embedded=true&url="+url);
This works pretty well when im trying to open an online pdf
I want the user to choose a pdf in his phone and i want to open that pdf in webview. Is there a way to achieve this in android? I have the PDF Location. Just want to open in
No, that's not possible. You can't do that. Read some websites first before creating apps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.