Can't open a local PDF in webview using file://
问题 I need to display a PDF file located in my app dir in a webwiev without using Google Docs. This is my code for the webview: public void OpenPDF() { WebView webview = new WebView(this); setContentView(webview); webview.getSettings().setJavaScriptEnabled(true); webview.loadUrl("file://mnt/data/data/com.example.android/files/Docs/test.pdf");; } I get a blank webview instead of below code works public void OpenPDF() { WebView webview = new WebView(this); setContentView(webview); webview