title: WebView NOT opening android default video player?
body: <p>when I view <a href="http://www.broken-links.com/2010/07/30/encoding-video-for-android/" rel="nofollow">this page</a> on my android device' default web browser and click the first video, it triggers the default video player of my device. It loads and play.</p>
  
  <p>However when I view the same link in my app, using a WebView, it does not open the default video player. What could be the problem?</p>
  
  <p>I'm using the webview code in <a href="http://www.codeofaninja.com/2011/05/how-to-view-webpage-inside-your-android.html" rel="nofollow">this link</a>.</p>
  
  <p>I also made the webview in full screen mode like what was said in the <a href="http://developer.android.com/sdk/android-2.0-highlights.html" rel="nofollow">docs</a>, is used this code to go fullscreen:</p>
  
  <pre><code>requestWindowFeature(Window.FEATURE_NO_TITLE);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  </code></pre>
  
  <p>EDIT: I'm now using the following code, but still not work, any ideas?</p>
  
  <pre><code>package com.example.Playmp4OnWebView;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.view.Window;
  import android.view.WindowManager;
  import android.webkit.WebSettings;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  
  public class PlayMp4OnWebView extends Activity {
       /** Called when the activity is first created. */
       @Override
       public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
  
            requestWindowFeature(Window.FEATURE_NO_TITLE);
            getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
  
            WebView webview = new WebView(this);
            setContentView(webview);
  
            WebSettings webSettings = webview.getSettings();
            webSettings.setJavaScriptEnabled(true);
            webSettings.setSupportZoom(false);
            webSettings.setPluginsEnabled(true);
            webSettings.setAllowFileAccess(true);
  
            webview.setWebViewClient(new WebViewClient(){
  
                public boolean shouldOverrideUrlLoading(WebView view, String url){
                     if(url.endsWith(".mp4")){
                          Intent i = new Intent(Intent.ACTION_VIEW);
                          i.setData(Uri.parse(url));
                          startActivity(i); //warning no error handling will cause force close if no media player on phone.
                          return true;
                     }
                     else return false; 
                }});
  
         //This will load the webpage that we want to see
          webview.loadUrl("http://www.broken-links.com/2010/07/30/encoding-video-for-android/");
  
       }
  }
  </code></pre>