I have spent hours of searching and trying, but it does not work anyway.
I am trying to display a PDF-File with inside of a WebView
inside of a fragment
.
At the beginning you can see a small line with the Google loading circle in it.
After everything is loaded, the WebView only shows a blank screen.
Here is my code fragment.java:
final View webViewLayout = layoutInflater.inflate(R.layout.webview_empty, null);
linearLayout.addView(webViewLayout);
WebView webview = (WebView) linearLayout.findViewById(R.id.webview);
String myPdfUrl = "gymnasium-wandlitz.de/vplan/vplan.pdf";
//String url = "http://staglay.com/pdfjs/web/viewer.html";
webview.getSettings().setJavaScriptEnabled(true);
String url = "http://docs.google.com/viewer?embedded=true&url="+myPdfUrl;
webview.setWebViewClient(new MyWebViewClient());
webview.loadUrl(url);
And my webview xml:
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
Here is my Logcat:
09-13 13:01:08.299 8501-8501/de.toeducate.tosub I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
09-13 13:01:08.299 8501-8501/de.toeducate.tosub I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
09-13 13:01:08.302 8501-8501/de.toeducate.tosub I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
09-13 13:01:08.302 8501-8501/de.toeducate.tosub I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
09-13 13:01:08.308 8501-8501/de.toeducate.tosub I/cr_LibraryLoader: Time to load native libraries: 1 ms (timestamps 5927-5928)
09-13 13:01:08.308 8501-8501/de.toeducate.tosub I/cr_LibraryLoader: Expected native library version number "52.0.2743.98", actual native library version number "52.0.2743.98"
09-13 13:01:08.319 8501-8501/de.toeducate.tosub V/WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {a6e1879}
09-13 13:01:08.319 8501-8501/de.toeducate.tosub I/cr_LibraryLoader: Expected native library version number "52.0.2743.98", actual native library version number "52.0.2743.98"
09-13 13:01:08.319 8501-8501/de.toeducate.tosub I/chromium: [INFO:library_loader_hooks.cc(143)] Chromium logging enabled: level = 0, default verbosity = 0
09-13 13:01:08.331 8501-8501/de.toeducate.tosub I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
09-13 13:01:08.389 8501-10510/de.toeducate.tosub W/cr_media: Requires BLUETOOTH permission
09-13 13:01:08.427 8501-10516/de.toeducate.tosub D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
09-13 13:01:08.438 8501-8501/de.toeducate.tosub W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
09-13 13:01:08.453 8501-8501/de.toeducate.tosub I/cr_Ime: ImeThread is not enabled.
09-13 13:01:08.477 8501-8501/de.toeducate.tosub W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
09-13 13:01:08.480 8501-8501/de.toeducate.tosub I/cr_Ime: ImeThread is not enabled.
09-13 13:01:08.504 8501-10516/de.toeducate.tosub D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
09-13 13:01:08.527 8501-10523/de.toeducate.tosub E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
09-13 13:01:08.547 8501-10523/de.toeducate.tosub W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc
09-13 13:01:08.557 8501-10523/de.toeducate.tosub W/VideoCapabilities: Unrecognized profile/level 0/0 for video/mpeg2
09-13 13:01:08.557 8501-10523/de.toeducate.tosub W/VideoCapabilities: Unrecognized profile/level 0/2 for video/mpeg2
09-13 13:01:08.557 8501-10523/de.toeducate.tosub W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
09-13 13:01:08.572 8501-10523/de.toeducate.tosub I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
09-13 13:01:08.619 8501-8501/de.toeducate.tosub W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 8501
09-13 13:01:08.620 8501-8501/de.toeducate.tosub W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 8501
09-13 13:01:08.904 8501-8501/de.toeducate.tosub W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 8501
09-13 13:01:09.039 8501-8501/de.toeducate.tosub W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 8501