In my application, I used to start through Intent.ACTION_VIEW external application for viewing images/videos and so on.
For security reasons I need to close started Intent from my application. How to do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you know which application you’re launching use
You can get the process id from the running process using this class: RunningAppProcessInfo
You can’t get that directly, because that is a violation of security:
Why don’t you limit the choices given to the user by calling setPackage()
If you really want to know which application was launched, here is the code