让我的应用出现在YouTube分享中?

时间:2016-02-24 01:08:13

标签: android youtube share intentfilter

我知道这已被问过很多次了,但我已经尝试了答案而且没有用过。这是我目前的意图过滤器

<intent-filter>
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="*/*" android:scheme="http" />
</intent-filter>

我要找的答案是android youtube: share a youtube video TO my app?How to appear my app in YouTube share via list?

但由于某种原因,他们不能为我工作。我尝试了很多替代方案,使用android:host,使用不同的方案,特定的mime类型。点击分享到我的应用后,我只需要获取YouTube视频的网址。 有什么想法吗?

1 个答案:

答案 0 :(得分:4)

你必须添加:

<intent-filter>
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="text/plain" />
        </intent-filter>

在你的清单文件中(我刚试过;))。

源:Youtube intent filter & scheme 更多信息:http://developer.android.com/training/basics/intents/filters.html

相关问题