nr1
nr1

Reputation: 11

Playing youtube videos through intent

How do i make an intent open an youtube video? Thanks

Upvotes: 1

Views: 850

Answers (3)

Derzu
Derzu

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

MBober
MBober

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

User
User

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.

Youtube API

Upvotes: 1

Related Questions