Is it possible to integrate youtube channel in android?

断了今生、忘了曾经 提交于 2019-11-30 14:23:19

问题


I have the code for integrating YouTube videos in android.

What I want is to create a listview which lists different channels, and when user clicks on a channel it shows all the videos for that channel. By this way when a new video is loaded in a channel it will automatically be available in my app also.

Is it possible to integrate YouTube channel in android?


回答1:


Yes! Check out the Android Youtube Player API and the YouTube API.

Android Player: https://developers.google.com/youtube/android/player/

YouTube API: https://developers.google.com/youtube/

YouTube Player API Sample: (sample folder in zip) https://developers.google.com/youtube/android/player/downloads/

EDIT

The Data API lets you get information about videos in a channel, you can then use that info to construct your list of videos and update it accordingly.

For example, the following would retrieve the latest videos from a channel:

https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults=20

https://developers.google.com/youtube/v3/

Good Luck!



来源:https://stackoverflow.com/questions/26549908/is-it-possible-to-integrate-youtube-channel-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!