Android SslErrorHandler - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SslErrorHandler class.

This code example shows how to use the following methods:proceed
    @Override 
    public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
         
        if(RhoConf.getBool("no_ssl_verify_peer")) { 
            Logger.D(TAG, "Skip SSL error.");
            handler.proceed();
        } else { 
            StringBuilder msg = new StringBuilder();
            msg.append("SSL error - ");
            switch(error.getPrimaryError()) {
            case SslError.SSL_NOTYETVALID:
                msg.append("The certificate is not yet valid: ");
                break; 
            case SslError.SSL_EXPIRED:
                msg.append("The certificate has expired: ");
                break; 
            case SslError.SSL_IDMISMATCH:
                msg.append("Hostname mismatch: ");
                break; 
            case SslError.SSL_UNTRUSTED:
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:proceed
 
    // enable https 
    @Override 
    public void onReceivedSslError(WebView view, SslErrorHandler handler,
                                   SslError error) {
        handler.proceed();
    } 
 
    @Override 
    public void onPageFinished(WebView view, String url) {
        if (url.startsWith("http://www.ingress.com/intel")
         || url.startsWith("https://www.ingress.com/intel")) {
            Log.d("iitcm", "injecting iitc..");
            view.loadUrl("javascript: " + this.mIitcScript);
        } 
        super.onPageFinished(view, url);
    } 
 
    /** 
     * this method is called automatically when the Google login form is opened. 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:cancel
        @Override 
        public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
            super.onReceivedSslError(view, handler, error);
 
            sendErrorToListener(new FacebookDialogException(null, ERROR_FAILED_SSL_HANDSHAKE, null));
            handler.cancel();
            WebDialog.this.dismiss();
        } 
 
        @Override 
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            Utility.logd(LOG_TAG, "Webview loading URL: " + url);
            super.onPageStarted(view, url, favicon);
            if (!isDetached) {
                spinner.show();
            } 
        } 
 
        @Override 
        public void onPageFinished(WebView view, String url) {
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:proceed
            view.loadUrl(url);
            return true; 
        } 
         
		public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
            handler.proceed();
        } 
    } 
 
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
 
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
 
        setContentView(R.layout.sphero_world_web_view);
        webview = (WebView) findViewById(R.id.webview);
        webview.setWebViewClient(new RobotAchievementWebViewClient());
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:proceed
				return false; 
			} 
 
			public void onReceivedSslError(WebView view,
					SslErrorHandler handler, SslError error) {
				handler.proceed();
			} 
		}); 
		System.out.println("load " + url);
		authView.loadUrl(url);
	} 
 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:proceed
    public void setSSLNoSecure(WebView webView) {
         
        WebViewClient wvc = new WebViewClient() {
            @Override 
            public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
                handler.proceed();
            } 
        }; 
        webView.setWebViewClient(wvc);
    } 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:cancel
     *            response. 
     * @param error The SSL error object. 
     */ 
    public void onReceivedSslError(WebView view, SslErrorHandler handler,
            SslError error) {
        handler.cancel();
    } 
 
    /** 
     * Notifies the host application that the WebView received an HTTP 
     * authentication request. The host application can use the supplied 
     * {@link HttpAuthHandler} to set the WebView's response to the request. 
     * The default behavior is to cancel the request. 
     * 
     * @param view the WebView that is initiating the callback 
     * @param handler the HttpAuthHandler used to set the WebView's response 
     * @param host the host requiring authentication 
     * @param realm the realm for which authentication is required 
     * @see Webview#getHttpAuthUsernamePassword 
     */ 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:proceed
public class JCWebViewClient extends WebViewClient {
 
	@Override 
	public void onReceivedSslError(WebView view, SslErrorHandler handler,
			SslError error) {
		handler.proceed(); // Ignore SSL certificate errors
	} 
 
	@Override 
	public boolean shouldOverrideUrlLoading(WebView view, String url) {
		/* 
		 * if (Uri.parse(url).getHost().equals("www.example.com")) { // This is 
		 * my web site, so do not override; let my WebView load the page return 
		 * false; } // Otherwise, the link is not for a page on my site, so 
		 * launch another Activity that handles URLs Intent intent = new 
		 * Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(intent); 
		 * return true; 
		 */ 
		view.loadUrl(url);
		return true; 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:proceed
	} 
 
	@Override 
	@JavascriptInterface 
	public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
		handler.proceed();
	} 
	 
	@Override 
	@JavascriptInterface 
	public void onPageFinished(WebView view, String url) {
		//view.loadUrl("javascript:(function(){document.getElementById('mA').click();})()"); 
		view.loadUrl("www.google.ru");
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:proceed
		view.loadUrl(url);
		return true; 
	} 
 
	public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
		handler.proceed();
 
	} 
 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android SslErrorHandler Questions & Answers:

See Code Examples for Android SslErrorHandler Methods: