The Android tutorial uses WebView to access the URL of HTTPS and handles the sslerror example
•
Android
In Android, WebView is a control used to load HTTP and HTTPS web pages to local applications. By default, through the loadurl (string URL) method, you can successfully load, for example, http://www.baidu.com Such pages. However, when the load has an HTTPS page of SSL layer, such as https://money.183.com.cn/ , if the security certificate of this website cannot be authenticated on Android, WebView will become a blank page instead of a risk prompt box in PC browser. Therefore, we must deal with this situation.
There are two classes used in Android processing
The specific usage is as follows:
If you simply accept all certificates, just call the process () method directly.
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码