title: How to handle intent:// on a webView URL?
body: <p>I'm currently developing an android app with a <code>webView</code>. On some <code>urls</code> I need to use the <code>shouldOverrideUrlLoading</code> method, which is pretty straight forward :</p>
  
  <pre><code>if(url.startsWith("something")){
  //do something
  return true;
  }
  </code></pre>
  
  <p><strong>My problem:</strong></p>
  
  <p>Some <code>URLS</code>, on google search for example, have the following <code>URL</code> scheme : </p>
  
  <pre><code>intent://en.m.wikipedia.org/wiki/Test_cricket#Intent;scheme=http;package=org.wikipedia;S.browser_fallback_url=https%3A%2F%2Fwww.google.pt%2Fsearchurl%2Fr.html%23app%3Dorg.wikipedia%26pingbase%3Dhttps%3A%2F%2Fwww.google.pt%2F%26url%3Dhttps%3A%2F%2Fen.m.wikipedia.org%2Fwiki%2FTest_cricket;S.android.intent.extra.REFERRER_NAME=https%3A%2F%2Fwww.google.pt;launchFlags=0x8080000;end
  </code></pre>
  
  <p>I've tried using :</p>
  
  <pre><code>Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
  startActivity(browserIntent);
  </code></pre>
  
  <p>But I got an error:  </p>
  
  <pre><code>10-15 15:18:15.546: W/System.err(29086): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=intent://en.m.wikipedia.org/wiki/Test_cricket }
  </code></pre>
  
  <p>How should I handle this kind of <code>URL</code> scheme ?</p>
  
  <hr>
  
  <p><strong>UPDATE:</strong>  </p>
  
  <p>Following @CommonsWare comments, I've tried using <code>parseUri()</code> on <code>Intent</code> to create an <code>Intent object</code> from the <code>URL</code> and then try <code>startActivity()</code>, something like:</p>
  
  <pre><code>Intent myIntent = new Intent().parseUri(url, Intent.URI_INTENT_SCHEME);
  startActivity(myIntent);
  </code></pre>
  
  <p>But I still get :</p>
  
  <pre><code>android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://en.m.wikipedia.org/wiki/Test_cricket flg=0x8080000 pkg=org.wikipedia (has extras) }
  </code></pre>
  
  <p>I may have got the instructions wrong or I'm simply unable to construct the <code>intent</code> as @CommonsWare specified. Any tips on how to construct the <code>Intent</code>?</p>