意图过滤器捕获所有共享意图
16lz
2021-01-22
How can I set my activity to be able to respond to any type of Sharing Intent.
我如何设置我的活动能够响应任何类型的共享意图。
I have tried:-
我尝试过:-
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="*"/>
</intent-filter>
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?
但是,我读过http://developer.android.com/guide/topics/intents/intents/intents/intents-filters.html,但是不清楚如何打开它?
Any help will be much appreciated.
如有任何帮助,我们将不胜感激。
4 个解决方案
#1
29
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>
更多相关文章
- Android极光推送jPush混淆解决方案终极篇
- 【Android开发学习39】VideoView在GLSurfaceView之上显示的解决
- Android 3.2 以上转屏,切换屏幕,横竖屏(onConfigurationChanged)会
- 王家林最受欢迎的一站式云计算大数据和移动互联网解决方案课程 V
- 在网页程序或Java程序中调用接口实现短信猫收发短信的解决方案
- javascript(六)js事件绑定浏览器兼容解决方案 attachEvent addEve
- java中多线程安全问题产生&解决方案——同步方法