Webview not able to load https url in android?

前端 未结 9 1370
别跟我提以往
别跟我提以往 2020-12-29 08:14

I am implementing webview application in android. When i am trying to load https url one or two times it finishes the activity. Agian tryin

9条回答
  •  滥情空心
    2020-12-29 08:42

    Add this overriding method to your WebViewClient implementation. You'll need to compile it with Android SDK 2.2 (API level 8) or later. The method appears in the public SDK as of 2.2 (API level 8) but we've tested it on devices running 2.1, 1.6 and 1.5 and it works on those devices too (so obviously the behaviour has been there all along).

    WebView.setWebViewClient(new WebViewClient() {
    
         public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error){
    
             handler.proceed(); 
    
         }
        });
    

提交回复
热议问题