I want to develop an application that triggers up automatically when the user pulls out the earphones. I would like to know if it is possible to run it in the foreground automatically avoiding the unlock screen.
Thank you in advance.
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 may run in background if you build a Service. Also, you may intercept the SCREEN_ON or SCREEN_OFF event (look for a BrodcasrReciever to see how to use it). Use that events to execute your code. And to disable your lockscreen…. it’s simple: