Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What intent-filters must my app cover to appear in chooser when requestion an image from an external app?

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:

enter image description hereenter image description here

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>

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?

like image 812
TragedyStruck Avatar asked Aug 31 '12 03:08

TragedyStruck


2 Answers

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" />
like image 79
TragedyStruck Avatar answered Oct 03 '22 18:10

TragedyStruck


Some applications may specify the application to open, and some applications have already set the default applications to Open.

like image 38
pzwwei Avatar answered Oct 03 '22 20:10

pzwwei