如何在 Android 应用中显示来自特定频道的所有 YouTube 视频 [英] How to display all YouTube videos from specific channel in Android app

查看:32
本文介绍了如何在 Android 应用中显示来自特定频道的所有 YouTube 视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在 Android 应用程序中显示来自特定频道的所有 YouTube 视频.我正在使用 Android Studio 开发 Android 应用程序......并且来自频道的新视频自动显示在 Android 应用程序中......请帮助我

How I display all YouTube videos from specific channel in Android app .I m using Android studio to develop Android App...and New video from channel automatically display in Android app.... Please Help Me

推荐答案

    String youtubeURL = "https://www.youtube.com/user/androiddevelopers";
    Intent youtubeIntent=null;
    try {
        youtubeIntent=new Intent(Intent.ACTION_VIEW);
        youtubeIntent.setPackage("com.google.android.youtube");
        youtubeIntent.setData(Uri.parse(youtubeURL ));
        startActivity(youtubeIntent);
    } catch (ActivityNotFoundException e) {  // If youtube app not available then using browser it should open
        youtubeIntent= new Intent(Intent.ACTION_VIEW);
        youtubeIntent.setData(Uri.parse(youtubeURL ));
        startActivity(youtubeIntent);
    }

这篇关于如何在 Android 应用中显示来自特定频道的所有 YouTube 视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆