意图过滤器来捕获所有共享意图 [英] Intent Filter to capture all sharing Intents

查看:102
本文介绍了意图过滤器来捕获所有共享意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置我的活动能够为任何类型的共享意向作出回应。

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>

这篇关于意图过滤器来捕获所有共享意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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