title: Android Stream Video from url
body: <p>Lets say I have a url (it is not specific it will be a youtube link)</p>
  
  <p>On click of the thumbnail/button I want to fire a pop up sorts that there is in android asking  which player to use.</p>
  
  <p>I know there are a lot of articles on it but I cannot get it working.</p>
  
  <p>I tried out this:</p>
  
  <pre><code>package com.example.videotry;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.net.Uri;
  import android.view.View;
  import android.view.View.OnClickListener;
  
  public class Play extends Activity implements OnClickListener {
  
  @Override
  public void onClick(View v) {
      if (v.getId() == R.id.imageButton1) {
          Intent intent = new Intent(Intent.ACTION_MAIN);
          intent.setType("video/*");
          intent.setData(Uri.parse("http://www.youtube.com/embed/PW_88sL_2dA?feature=oembed" ));
          startActivity(Intent.createChooser(intent, "Complete action using"));
      }
  
  
  
  }
  
  }
  </code></pre>
  
  <p>but it throws an error:</p>
  
  <pre><code>07-22 15:08:00.680: E/AndroidRuntime(8163): java.lang.NullPointerException
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at android.app.Activity.startActivityForResult(Activity.java:3190)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at android.app.Activity.startActivity(Activity.java:3297)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at com.example.videotry.Play.onClick(Play.java:18)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at android.view.View.performClick(View.java:3511)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at android.view.View$PerformClick.run(View.java:14110)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at android.os.Handler.handleCallback(Handler.java:605)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at android.os.Handler.dispatchMessage(Handler.java:92)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at android.os.Looper.loop(Looper.java:137)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at android.app.ActivityThread.main(ActivityThread.java:4424)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at java.lang.reflect.Method.invokeNative(Native Method)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at java.lang.reflect.Method.invoke(Method.java:511)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  07-22 15:08:00.680: E/AndroidRuntime(8163):     at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>It's not about the video format. I tried different formats. 
  I am using android 4.0</p>
  
  <p>I have also tried ACTION_VIEW</p>