Does the Web View on Android support SSL?
Not an expert, just what i could find on the web.
from what I understand, the WebView does indeed support ssl, however, the blank screen is an indication that the WebView does not believe that the certificate is valid. This may happen with a certificate that is self-signed or a from a root auth that is not set up in android (perfectly valid cert does not validate). In any case, if you are using froyo or better you can try something like:
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.webkit.SslErrorHandler;
import android.net.http.SslError;
...
engine = (WebView) findViewById(R.id.my_webview);
engine.setWebViewClient(new WebViewClient() {
@Override
public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) {
handler.proceed();
}
});
Android WebView complains of untrusted certificate but it is trusted in all other browsers
Browsers, in general, handle certificates a little bit different to work around issues as the one you encountered. I'm not familiar with browsers internals to point what is exactly different but I suggest they hold a list of trusted Certificate Authorities (CA) that is updated regularly, more frequently than a list of trusted CAs stored on the device.
Received certificates can be trusted:
- by the Android OS;
- by the app (see below how). I guess this is the alternative option browsers use.
You will have to work around this issue by providing modified SSLContext
. How to provide modified SSLContext can be found here.
This is not your case, but the issue can also arise when a certificate is self-signed. This is what I've encountered when developing applications and connecting to TLS enabled backend that uses a self-signed certificate.
Related Topics
Android: Overlay on Android Camera Preview
Exception:Aapt2 Error: Check Logs for Details
Android: How to Use Webcam in Emulator
How to Fix: "You Need to Use a Theme.Appcompat Theme (Or Descendant) with This Activity"
Mobile Vision API - Concatenate New Detector Object to Continue Frame Processing
Icon in Menu Not Showing in Android
Differencebetween Fragment and Fragmentactivity
Android Install APK with Intent.View_Action Not Working with File Provider
How to Set Cursor Position in Edittext
How to Implement the Material-Design Elevation for Pre-Lollipop
Hiding Title in a Fullscreen Mode
How to Set Dropdown Arrow in Spinner
Error Loading the Sdk When Eclipse Starts
Android Resources$Notfoundexception: Resource Id #0X7F030027
Gcm Service_Not_Available on Android 2.2