How do i show an alertdialog after i click on share : I have an app that uploads images from a gallery . 
After i click on share and pick my app , it launches my app and the upload begins.But i want to launch the upload without being redirected to my app , but through an alert dialog directly appearing after clicking on share.
How can i do this?
Thank you for your answers 