Monday, July 4, 2011

[android-developers] error playing youtube video in my app....

HI all,
I am getting a URL from web service which is of YouTube.
I am trying to run it on my device and emulator as well, but it give a
warning message "Can't play video".

This is the code I am using:-

String linkURL = intent.getStringExtra("URL");
videoView = (VideoView) findViewById(R.id.video_play);
Uri uri = Uri.parse(linkURL);
videoView.setVideoURI(uri);
videoView.setMediaController(new MediaController(this));
videoView.start();
videoView.requestFocus();

I would appreciate if anyone can help me out.
Thanks!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate