Search code examples
androidandroid-intentandroid-manifestandroid-gallery

How to add my intent to android gallery image context "set as"?


So, I have application, there is profile in there. I want to add menu position into gallery image, so the users can set their profile image dirrectly from gallery.

In gallery there is context menu "Set as". Set as .. contact icon, favorite, wallpaper.. etc..

I havent figure out, how to add my app there.

I've added to my manifest action send.

<action android:name="android.intent.action.SEND" />

But "Share via" is'nt that one, what I need..


Solution

  • The solution is to use android.intent.action.ATTACH_DATA at the manifest. And then handle it similar as SEND action.

    Than name of menu position can be easily changed by defining the label of activity where intent is defined.