Reputation: 11
How do i make an intent open an youtube video? Thanks
Upvotes: 1
Views: 850
Reputation: 7156
Do that:
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("http://www.youtube.com/watch?v=videoid")));
Your video will open on youtube application if you have one.
Upvotes: 1
Reputation: 1105
Just throw a normal VIEW intent with the video URL in it. If installed, the Youtube app will handle the intend. If not, the normal browser will do.
Upvotes: 0
Reputation: 1488
I think you might have some use for this youtube API for java, I didn't have time to use it myself yet but i think this is what you need.
Upvotes: 1