0

i'm trying use the MediaPlayer and videoView class to play youtube videos

but all failed , is that feasible??

i have seem some app can do that , i'm just thinking how to implement .....= =a?

peterlawn
  • 2,371
  • 6
  • 25
  • 44

1 Answers1

3

Are you trying to play it on a device or on emulator?

On a device you can use the default YouTube player to implement it. You need to pass a intent from your application along with the URL...Something like this

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/watch?v=cxLG2wtE7TM")));

Android YouTube app Play Video Intent

Community
  • 1
  • 1
DeRagan
  • 22,827
  • 6
  • 41
  • 50