Ignore ssl certificate requests in webview

后端 未结 1 1802
遥遥无期
遥遥无期 2021-01-29 08:43

I make small app which involve aspx pages , I try open it throw my webview I got blank screen .

I try open it with chrome browser it give me certificate needed

1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-29 09:26

    After some research I found the answer, just override onReceivedSslError method and skip it.

    @Override
    public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
        handler.proceed(); // Ignore SSL certificate errors
    }
    

    0 讨论(0)
提交回复
热议问题