Android的YouTube应用程序播放视频意向 [英] Android YouTube app Play Video Intent

查看:133
本文介绍了Android的YouTube应用程序播放视频意向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个应用程序,你可以下载YouTube视频的机器人。现在,我希望它这样,如果你在YouTube的本机应用程序中播放视频,你可以下载它。要做到这一点,我需要知道的意图是,YouTube的本机应用程序推出,以发挥YouTube应用。
我能做到这一点easially,如果我对我的模拟器在YouTube方案,所以我的第一个问题是:
1.我可以下载YouTube应用为我的模拟器,或...
2.什么是所使用的意图,当用户选择要播放的视频

I have created a app where you can download YouTube videos for android. Now, I want it so that if you play a video in the YouTube native app you can download it too. To do this, I need to know the Intent that the YouTube native app puts out in order to play the YouTube app.
I could do this easially if I had the YouTube program on my emulator, so my 1st question is:
1. Can I download the YouTube app for my emulator, or...
2. What is the intent used when the user selects a video for playback.

推荐答案

这将工作的设备上,但不是每个 Lemmy的答案。

This will work on a device but not the emulator per Lemmy's answer.

startActivity(新意图(Intent.ACTION_VIEW,Uri.parse(http://www.youtube.com/watch?v=cxLG2wtE7TM)));

这篇关于Android的YouTube应用程序播放视频意向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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