Tutorial by Examples

Launch standalone player activity Intent standAlonePlayerIntent = YouTubeStandalonePlayer.createVideoIntent((Activity) context, Config.YOUTUBE_API_KEY, // which you have created in step 3 videoId, // video which is to be played 100, //The time,...
public class CustomYouTubeActivity extends YouTubeBaseActivity implements YouTubePlayer.OnInitializedListener, YouTubePlayer.PlayerStateChangeListener { private YouTubePlayerView mPlayerView; private YouTubePlayer mYouTubePlayer; private String mVideoId = "B08iLAtS3AQ"; ...
The following code implements a simple YoutubePlayerFragment. The activity's layout is locked in portrait mode and when orientation changes or the user clicks full screen at the YoutubePlayer it turns to lansscape with the YoutubePlayer filling the screen. The YoutubePlayerFragment does not need to...
Obtaining the Android API Key : First you'll need to get the SHA-1 fingerprint on your machine using java keytool. Execute the below command in cmd/terminal to get the SHA-1 fingerprint. keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android...
This example will guide you how to get playlist data using the YouTube Data API on Android. SHA-1 fingerprint First you need to get an SHA-1 fingerprint for your machine. There are various methods for retrieving it. You can choose any method provided in this Q&A. Google API console and YouTub...

Page 1 of 1