title: Custom Android WebView to open all links internally except YouTube links
body: <p>I have a WebView app that I want to behave like this: </p>
  
  <p>The user can follow any link and the new page is opened inside the same WebView, except if the target is YouTube in which case I want two possible scenarios:</p>
  
  <ol>
  <li>Open the YouTube Android app to view the video</li>
  <li>Open the standard browser to view the video.</li>
  </ol>
  
  <p>My main activity is as follows:</p>
  
  <pre><code>package com.prgguru.android;
  import android.os.Bundle;
  import android.annotation.SuppressLint;
  import android.app.Activity;
  import android.webkit.WebView;
  
  
  @SuppressLint("SetJavaScriptEnabled")
  public class MainActivity extends Activity {
       WebView browser;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          browser=(WebView)findViewById(R.id.webkit);     
          browser.getSettings().setJavaScriptEnabled(true);
          browser.getSettings().setDefaultFontSize(20);
          browser.loadUrl("http://exo-agency.com/funnytube/");   
      }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>