title: sms html link in android webview
body: <p>I have created a WebView, and i can't figure out how I can handle href links like sms: or tel:, etc..</p>
  
  <p>Μy code does not work:</p>
  
  <pre><code>@Override
      public boolean shouldOverrideUrlLoading(WebView view, String url) {
          boolean result;
          result = false;
          // for telephone
          if (url.startsWith("tel:")) {
              view.getContext().startActivity(
                      new Intent(Intent.ACTION_CALL, Uri.parse(url)));
              result = true;
          }
  
  
  
          // for SMS or message.
          if (url.startsWith("sms:")) {
              view.getContext().startActivity(
                      new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
              Intent.addCategory(Intent.CATEGORY_DEFAULT);
              Intent.addCategory(Intent.CATEGORY_BROWSABLE);
              result = true;
          }
          return result;
  
      }
  </code></pre>