I want to create a service (or a broadcast)in my application that detect when the user select any application in the device. So my service will detect that a new application was started.
Is that possible?
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.
You should use
getRunningAppProcesses()to load the list of running apps and check the variation in this list.see this link
another solution is to analyze logcat output
see first answer to this question