user2137817
user2137817

Reputation: 1853

How to integrate a youtube channel to an android app without leaving it

I'm trying to integrate a youtube channel to my android application and i used this code :

intent.setData(Uri.parse(urlStr ));
startActivity(intent);

It works fine but it opens on the youtube website so no way to come back to the app.

What can i do to make the youtube a part of the application without leaving it ?

Upvotes: 0

Views: 2611

Answers (2)

Triode
Triode

Reputation: 11357

I would recommend using YouTube Data API v3. You have all the documentation needed described there. Hope this will help.

Upvotes: 2

Pablo Martinez
Pablo Martinez

Reputation: 1639

You can make this

Intent lVideoIntent = new Intent(null, Uri.parse("ytpl://"+YOUTUBE_PLAYLIST_ID), this, OpenYouTubePlayerActivity.class);

startActivity(lVideoIntent);

Look this project: https://code.google.com/p/android-youtube-player/

Upvotes: 0

Related Questions