'The certificate authority is not trusted, in android webview but works fine in mobile browser

I have to open a website inside a webview, I got error certificate auhtority un-trusted, but when I open the same web inside mobile browser it works fine, and I don't want to show a dialog inside onReceivedSslError handler.proceed



Solution 1:[1]

Try adding handler.proceed() in onReceivedSslError method of web view client.

Solution 2:[2]

I had the same issue, and ended up adding the certificate explicitly as described here:

https://developer.android.com/training/articles/security-config#TrustingAdditionalCas

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 adiga
Solution 2 santiago