I'm working on a Project, which loads a Webview within native Apps.
The App contains a WebView, which is only loading correctly on old Android Devices (4.1.2). On a new Version (4.4. and higher), the View stays blank.
I tried already to set the mixed content:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}
But it wont change anything. Same with the handler.proceed() function.
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed(); // Ignore SSL certificate errors
}
The Website contains a lot of JavaScript, so i tried also different Settings like setDomStorageEnabled and so on... Actually the Environment is a test-server, so the Certificates are created on our own. So I just want to test the app and dont think about publishing and the probably issues. But I don't get an error in logcat, so I really don't know, what else could be wrong and how investigate further.
I can recommend you to debug your newer devices.
Here you have a nice sample.
You will be able to debug all request and responses and even look through all of that fantastic JS stuff:)