I also listen to SCREEN_ON/OFF broadcasts in a couple of my apps. But, starting in 2.1 there is a new isScreenOn method:
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); boolean isScreenOn = pm.isScreenOn(); It won't actually help me with my apps since I'm interested in transitions between on and off, but its nice to have anyway. Good luck, Steve On Mar 29, 3:20 pm, JP <[email protected]> wrote: > On Mar 29, 3:00 am, zhiqiang wang <[email protected]> wrote: > > > Hi,How can I detect the screen is on or off? > > We' had that before, I've implemented the following > solution:http://groups.google.com/group/android-developers/browse_thread/threa... -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

