I am writing a camera application for Android, I want my application to be listed when video/photo is requested to be taken in applications like whatsapp messenger.
For example, in whatsapp when you click attach picture you can select the stock camera, or if I install vignette, I can use vignette.
How do I know which intent to listen to?
Thanks!
You need to use Intent Filter to do this.
If you add the Intent Filter with Data , category and data as given above , it will ask for Application if you need to share some Photos say Share Image outside of Application from image Gallery.
If you Select you application it will Redirect the Control to your Activity.
Inside you Activity you handle your Intent by using :
Now cursor will contains your selected image.
This is for Image chooser, you can use same for Video ,needed to change the mimitype in Manifest file of Intent Filter.