title: Can't Play Video using android default video player using intent
body: <p>My Android Device can play directly the same Video MP4 and AVI Video Files but while using source code, it is giving me an error  "Can't Play this Video" after a progress dialog box with message of "Loading Video"..
  I am using both the ways:
  1. First Method:</p>
  
  <pre><code>Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
  Uri data = Uri.parse("http://localhost/h.mp4");
                      intent.setDataAndType(data, "video/*");
                      startActivity(intent);
  </code></pre>
  
  <ol>
  <li><p>Second Method:</p>
  
  <pre><code>    Intent intent = new Intent(Intent.ACTION_MAIN);
      intent.addCategory(Intent.CATEGORY_HOME);
      intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      startActivity(intent);
  </code></pre></li>
  </ol>
  
  <p>ANY HELP ?</p>