In need a keylistener when my application is running in background. Knowing that KeyEvents can only be handled by Activities, what would be the best way around?
Thanks !
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.
Fortunately, this is not possible in general, for obvious privacy and security reasons. You have no rights to find out what the user types in unless you are the foreground activity.
A few buttons will send out broadcasts if their events are not consumed by the foreground activity, such as the CAMERA button.