什么意图过滤器必须我的应用程序涵盖出现在选配时再审从外部应用程序的图像? [英] What intent-filters must my app cover to appear in chooser when requestion an image from an external app?

查看:76
本文介绍了什么意图过滤器必须我的应用程序涵盖出现在选配时再审从外部应用程序的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是可能的意图过滤器,我需要支付,以确保任何外部应用程序请求的图像会在列表中看到我的应用程序?

What are the possible intent-filter I need to cover to make sure that any external app requesting an image will see my app in the list?

要澄清一下,我想我的应用程序出现时做以下内容:

To clarify, I'd like my app to appear when doing the following:

到目前为止,我已经介绍了:

So far I've covered:

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

不过,如果使用的tumblr的应用程序和pressing添加照片,我的应用程序不会出现在选择器对话框。我失去了它过滤掉了?

However, if using the Tumblr app and pressing "Add photo", my app does not appear in the chooser dialog. Which filter am I missing out on?

推荐答案

我已覆盖了正确的意图过滤器,但是的tumblr应用程序需要的类打开的,所以不是我了,我现在正在使用的过滤器:

I had covered the correct intent-filters, however the Tumblr app requires the category OPENABLE, so instead of the filters I had I'm now using:

<intent-filter>
    <action android:name="android.intent.action.PICK" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
    <action android:name="android.intent.action.GET_CONTENT" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.OPENABLE" />
    <data android:mimeType="image/*" />
</intent-filter>

只有加入一行:

Only adding the line:

<category android:name="android.intent.category.OPENABLE" />

这篇关于什么意图过滤器必须我的应用程序涵盖出现在选配时再审从外部应用程序的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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