Code example for SslError

Methods: toString

0
			*/ 
 
			@Override 
			public void onReceivedSslError(WebView view,
					SslErrorHandler handler, SslError error) {
				Log.d("ReboundMe", error.toString());
				Toast.makeText(WebActivity.this, "SSL error " + error.toString(), Toast.LENGTH_SHORT).show();
				super.onReceivedSslError(view, handler, error);
			} 
 
			@Override 
			public boolean shouldOverrideUrlLoading(WebView view, String url) {
				Toast.makeText(WebActivity.this, "Loading url " + url, Toast.LENGTH_SHORT).show();
				if (url.startsWith("javascript")) {
					Intent ret = new Intent();
					String[] tokens = url.split("\\?|&|=");
					for (int i=0; i < tokens.length; ++i) {
						if (tokens[i].equals("code")) {
							ret.putExtra("RESULT_STRING", tokens[i+1]);
//							Toast.makeText(WebActivity.this, "Returning " + tokens[i+1], Toast.LENGTH_SHORT).show(); 
							setResult(RESULT_OK, ret);