意图过滤器来捕获所有共享意图意图、过滤器

由网友(原来我自作多情)分享简介:如何设置我的活动能够为任何类型的共享意向作出回应。How can I set my activity to be able to respond to any type of Sharing Intent.我曾尝试: - 如何设置我的活动能够为任何类型的共享意向作出回应。

How can I set my activity to be able to respond to any type of Sharing Intent.

我曾尝试: -

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

不过,这是不行的,我已阅读的http://开发商.android.com /引导/主题/意图/意图,filters.html ,但目前还不清楚如何被打开的?

However this does not work, I have read http://developer.android.com/guide/topics/intents/intents-filters.html but it is not clear how to be that open?

任何帮助将大大AP preciated。

Any help will be much appreciated.

推荐答案

这是它是如何做: -

This is how it is done:-

<intent-filter>
    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT"/>
    <data android:mimeType="application/*" />
    <data android:mimeType="audio/*" />
    <data android:mimeType="image/*" />
    <data android:mimeType="message/*" />
    <data android:mimeType="multipart/*" />
    <data android:mimeType="text/*" />
    <data android:mimeType="video/*" />
</intent-filter>
阅读全文

相关推荐

最新文章