title: Playing Videos in Android Application without Youtube API
body: <p>I am making an application in which I want to play online videos from sites like youtube, daily motion, vimeo, etc.  The problem I am facing is that when I try to play videos from daily motion, the videos are not playing and the player replies with an error: "There was a problem with the network". My internet connection is working fine. </p>
  
  <p>My main activity file is here:</p>
  
  <pre><code>import android.support.v7.app.ActionBarActivity;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.widget.MediaController;
  import android.widget.VideoView;
  
  
  public class Main extends ActionBarActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.fragment_main);
  
          Button button = (Button) findViewById(R.id.button1);
          button.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View arg0) {
                  // TODO Auto-generated method stub
                  String video_path = "http://tune.pk/player/embed_player.php?vid=4240467";
                  Uri uri = Uri.parse(video_path);
                  uri = Uri.parse("vnd.youtube:"  + uri.getQueryParameter("v"));
  
                  Intent intent = new Intent(Intent.ACTION_VIEW , uri);
                  startActivity(intent);
              }
          });
      }
  }
  </code></pre>
  
  <p>Manifest file is this..</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.solutionproviders.videotest"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="19" /&gt;
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.solutionproviders.videotest.Main"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Please tell me what mistake I am making.</p>