'Java How to launch myapp by opening an image?

I'm working on an image editor app and I want to have my app being in the 'Open With ...' list when the user clicks on an image from file manager or ... (Like how 'Photo Editor' app did) :

Click to see the example (Edited)

And the problem is that I don't know how to do such a thing.

I have researched in youtube and I found that it's about the intent filter in the Manifest.xml file.

I already tried adding some <action/> to my intent filter by random but it didn't worked.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source