In my application I need to know when device is locked (on HTC’s it looks like short press on “power” button). So the question is: which event is triggered when device is locked? Or device is going to sleep?
Share
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 extend
BroadcastReceiverand implementonReceive, like this:Then you just have to register it and you’ll start receiving events when the screen is switched off: