How to using YouTube API to Embed Video in You Android App?

This guide will show you show how to configure application playing YouTube Video in You Android App.

Info!
How to register your application and create a "SHA1 fingerprint" you can use the official Google documentation! https://developers.google.com/youtube/android/player/register

go to https://console.developers.google.com/

Select You Project (2) or Create New Project (2)

How to using YouTube API to Embed Video in You Android App?

Click -> Enabled APIs and services

How to using YouTube API to Embed Video in You Android App?

Click -> YouTube Data API v3

How to using YouTube API to Embed Video in You Android App?

Click -> Enable

How to using YouTube API to Embed Video in You Android App?

Click -> "Credentials" in side menu (1), Click -> "Create credentials" (2) and select "OAuth client ID"

How to using YouTube API to Embed Video in You Android App?

You need create client id, see screenshot

How to using YouTube API to Embed Video in You Android App?

You need create API KEY. Click -> "Credentials" in side menu (1), Click -> "Create credentials" (2) and select "API key"

How to using YouTube API to Embed Video in You Android App?

Please select you API KEY

How to using YouTube API to Embed Video in You Android App?

Please configure you API KEY, see screenshot

How to using YouTube API to Embed Video in You Android App?

Please copy you API KEY

How to using YouTube API to Embed Video in You Android App?

Please enter you API KEY to app config Constants.java. You need modify value of constant "YOUTUBE_API_KEY"