意图使用youtube app个人资料/频道 [英] intent to youtube app profile/channel

查看:208
本文介绍了意图使用youtube app个人资料/频道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以让youtube应用程序轻松查看视频,但是如何获取个人资料/频道?

I am able to intent to the youtube app to view a video easily enough, but how about getting to a profile / channel?

    public void YouTube(String id) {
        // Play Youtube Video
        Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:"+id));
        mContext.startActivity(i);
    }

我......不知道从哪里开始?是否有特定的Uri要解析?我当然试过在互联网上搜索,我正在寻找答案。首先是否可能?

I.. just don't know where to really begin here? Is there a specific Uri to parse? I've tried scouring the internet of course and I'm coming up dry for answers. Is it even possible in the first place?

谢谢大家!

推荐答案

截至目前,没有针对直接触发YouTube应用程序的渠道的特定URI方案。 vnd.youtube 方案仅针对播放单个视频的活动进行定义。因此,您必须为频道页面指定规范的YouTube网址,并且通常让用户通过应用程序选择器对话框 - 假设设备已安装YouTube应用程序,对话框将显示至少两个条目,第二个用于浏览器。

As of now, there is no specific URI scheme for channels that would trigger the YouTube application directly. The vnd.youtube scheme is defined only for the activity that plays a single video. So, you have to specify the canonical YouTube URL for the channel page, and typically let the user pass through the application chooser dialog - assuming that the device has the YouTube application installed, the dialog would display at least two entries, the second being for the browser.

这篇关于意图使用youtube app个人资料/频道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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