title: Webview and HTTPS?
body: <p>I was wondering if anyone can help me out?</p>
  
  <p>I want to develop an app (webview) for android but it used to work with http:// links but somehow https:// links can't be opened. When I visit the normal site with my normal browser it asks for my permission for proceeding with a certificate.</p>
  
  <p>My question is now how to allow the certificates and view HTTPS?</p>
  
  <p>I will post my source below of my webview activity, thanks in advance :)</p>
  
  <pre><code>  package im.testing.a.cool.app;
  
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.Window;
  import android.webkit.WebChromeClient;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  
  public class WebPageLoader extends Activity
  {
      final Activity activity = this;
  
      @Override
      public void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          this.getWindow().requestFeature(Window.FEATURE_PROGRESS);
          setContentView(R.layout.main);
          WebView webView = (WebView) findViewById(R.id.webview);
          webView.getSettings().setJavaScriptEnabled(true);
  
  
          webView.setWebChromeClient(new WebChromeClient() {
              public void onProgressChanged(WebView view, int progress)
              {
                  activity.setTitle("Grabbing the bits and the bytes..");
                  activity.setProgress(progress * 100);
  
                  if(progress == 100)
                      activity.setTitle(R.string.app_name);
              }
          });
  
  
  
          webView.setWebViewClient(new WebViewClient() {
              @Override
              public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
              {
                  // Handle the error  (does the ssl goes hier?)
  
              engine = (WebView) findViewById(R.id.my_webview);
  engine.setWebViewClient(new WebViewClient() {
   public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) {
   handler.proceed() ;
   }
  
              @Override
              public boolean shouldOverrideUrlLoading(WebView view, String url)
              {
                  view.loadUrl(url);
                  return true;
              }
          });
  
          webView.loadUrl("https://website.willnot.open");
      }
   }
  </code></pre>