0

How to play YouTube video in Android native player? If any one achieved this please let me know the way.

Andrew T.
  • 4,701
  • 8
  • 43
  • 62
Murugan
  • 15
  • 1
  • 4

3 Answers3

0

http://apiblog.youtube.com/2012/12/no-webview-required-with-native-youtube.html

maybe this link will be of some assistance ? There are various API's out there that can achieve this for you.

API, an abbreviation of application program interface, is a set of routines, protocols, and tools for building software applications. A good API makes it easier to develop a program by providing all the building blocks. A programmer then puts the blocks together. This API in particular should offer you the best assistance.

Luke Rixson
  • 607
  • 5
  • 20
0

You can check out the API here: https://developers.google.com/youtube/android/player/downloads/

Then you need to register your application (get an API key) https://developers.google.com/youtube/android/player/register

And then you can simply add the required methods to your Activity: https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayerView

There is also the createPlayVideoIntentWithOptions, it opens up the native youtube application installed on the device

public static Intent createPlayVideoIntentWithOptions (Context context, String videoId, boolean fullscreen, boolean finishOnEnd)
Josue Alexander Ibarra
  • 8,269
  • 3
  • 30
  • 37
0

Tryout the link below; http://www.androidhive.info/2014/12/how-to-play-youtube-video-in-android-app/

It's a step by step tutorial.

Duncan O. N.
  • 778
  • 12
  • 24