title: Android : Simple web application crashes on links other then the http scheme
body: <p>I am a beginner in developing for the Android, so excuse me if this is obvious. I created a simple web application using the samples from android.com however, when a link like tel: or mailto: is clicked, the application crashes and askes me to force quit. I was wondering if anyone could tell me why.</p>
  
  <pre><code>public class MyApplication extends Activity {
  
      WebView mWebView;
  
      private class InternalWebViewClient extends WebViewClient {
          @Override
          public boolean shouldOverrideUrlLoading(WebView view, String url) {
  
              // This is my web site, so do not override; let my WebView load the page
              if (Uri.parse(url).getHost().equals("m.mydomain.nl")) {
                  return false;
              } else {
                  // 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;
              }
  
          }
      }
  
      @Override
      public boolean onKeyDown(int keyCode, KeyEvent event) {
          if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; mWebView.canGoBack()) {
              mWebView.goBack();
              return true;
          }
          return super.onKeyDown(keyCode, event);
      }
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          /* Use the WebView class to display website */
          mWebView = (WebView) findViewById(R.id.webview);
          mWebView.setWebViewClient(new InternalWebViewClient());
          mWebView.getSettings().setJavaScriptEnabled(true);
          mWebView.loadUrl("http://m.mydomain.nl/");
      }
  
  }
  </code></pre>