-2

Basically I am making a simple app and I need to know that how when you click a button a video in the youtube app opens up and can be watched. I could not find any code that I could understand. Thank You your help it will be very much appreciated.

1 Answers1

0

Even tho I have downvoted Ill give you an answer from a single google search.

Just a simple line of code: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/watch?v=cxLG2wtE7TM")));

It won't work on the emulator, only on your phone. source

FlyingNades
  • 432
  • 3
  • 16