Reputation:
I'm trying to add my app to "set as" list, that shown in gallery when I choose an image. If the user open an image in the gallery, there is a button for set as
. when the user tap it, he will get a list. In other words, if he want to use that image in my app.
I have tried :
<intent-filter>
<action android:name="android.intent.action.SET_WALLPAPER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
but i got nothing.
Upvotes: 3
Views: 205
Reputation: 17841
The intent-filter
to add out own app to the list in Gallery and Photos app for "use as" or "set picture as" is ATTACH_DATA
.
<intent-filter>
<action android:name="android.intent.action.ATTACH_DATA"/>
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
Upvotes: 0
Reputation: 2547
Now i've understand: You have to register your Activity to handle Images input from other apps. Insert this in your Manifest:
<activity android:name=".YourActivity" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
More infos on Develop>Training>Receiving Simple Data from Other Apps
Upvotes: 1