title: http:// a href link not working in Android
body: <p>I'm using a webview in my Android App.</p>
  
  <p>I have 3 buttons 1 for a link to a website one to call a number and one email button.</p>
  
  <p>At first calling my website button worked, <a href="http://www.somelink.com" rel="noreferrer">http://www.somelink.com</a>  .</p>
  
  <p>But my tel: link was not working. So I integrated some code that made my tel: button work.</p>
  
  <p>The problem is that it has made my website or http: button not work?</p>
  
  <p>The html button just does nothing when you click it.</p>
  
  <pre><code>package de.sonae.novolam;
  
  import android.annotation.SuppressLint;
  import android.app.Fragment;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  
  
  @SuppressLint("SetJavaScriptEnabled")
  public class DFragment extends Fragment {
  
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  View mainView = (View) inflater.inflate(R.layout.dfragment, container, false);
  WebView webView = (WebView) mainView.findViewById(R.id.webview);
  webView.getSettings().setJavaScriptEnabled(true);
  
  webView.setWebViewClient(new WebViewClient() {
      @Override
      public boolean shouldOverrideUrlLoading(WebView wv, String url) {
      if (url.startsWith("tel:")) { 
              Intent intent = new Intent(Intent.ACTION_DIAL,
                      Uri.parse(url)); 
              startActivity(intent); 
      }
  
      return true;
  }
      });
  webView.loadUrl("file:///android_asset/contact.html");
  return mainView;
  }
  
  public boolean shouldOverrideUrlLoading(WebView webView, String url) {
      if( url.startsWith("http:") || url.startsWith("https:") ) {
          webView.loadUrl(url);
           Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
           startActivity( intent ); 
      }
  
      else if (url.startsWith("mailto:")) { 
  
      }
  
      // Otherwise allow the OS to handle it
      Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
      startActivity( intent ); 
      return true;
  }
  }
  </code></pre>