How can I tell if the screen is on in android?

Posted by user297020 on Stack Overflow See other posts from Stack Overflow or by user297020
Published on 2010-03-19T00:58:10Z Indexed on 2010/03/19 1:01 UTC
Read the original article Hit count: 217

Filed under:
|

In Android 2.2 (Level 7) the function PowerManager.IsScreenOn() returns a boolean that is true if the screen is turned on and false if the screen is turned off. I am developing code for Android 1.5 (Level 3). How do I accomplish the same task in older versions of Android? I do not want to turn the screen on or off in my code. I just want to know what it is.

© Stack Overflow or respective owner

Related posts about android

Related posts about android-sdk