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

Make my app appear in YouTube share?

我知道这个问题已经被问过很多次了,但我已经尝试了这些答案,但没有一个奏效。这是我当前的意图过滤器

<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? and How to appear my app in YouTube share via list?

但出于某种原因,它们对我不起作用。我尝试了很多替代方案,使用 android:host,使用不同的方案,特定的 mime 类型。单击“分享到我的应用程序”后,我只需要获取 youtube 视频的 url。 有什么想法吗?

您必须添加:

<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