Is there any methods to catch screen dim in android?
This code will work ?
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
boolean isScreenOn = pm.isScreenOn();
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.
As far as i know, there is no broadcast event sent when screen brightness changes. Also with most phones now employing auto-brightness, at any moment, screen brightness will change based on the algorithm and content displayed on the screen. You can only check when the Screen goes off or comes back on.