Reputation: 1514
I have referred the answers of
android-youtube-app-play-video-intent
how-to-play-youtube-video-in-my-android-application
and many more.All those are playing videos by using Intent
which creates a new Window and to be more precise by creating a new Activity.
But,I am having a scenario in which I want to play a Video on click of a Button by staying in the same Activity
refer this video tutorial: http://mfarhan133.wordpress.com/2010/10/13/using-audio-video-files-tutorial-for-android/
Upvotes: 0
Views: 3457
Reputation: 3529
If you want to play a video file from phone storage or streaming, you can use VideoView.
If you want to open youtube video, you can use a WebView in your activity and open the youtube link.
See this WebView Tutorial.
Upvotes: 0
Reputation: 11230
Use a VideoView http://developer.android.com/reference/android/widget/VideoView.html
Upvotes: 1