How to detect when the screen is on?

Posted by Jim Blackler on Stack Overflow See other posts from Stack Overflow or by Jim Blackler
Published on 2010-04-04T19:47:31Z Indexed on 2010/04/04 19:53 UTC
Read the original article Hit count: 294

Filed under:

As mentioned in a previous question, I am having difficulty intercepting all android.intent.action.SCREEN_ON events without a long-lived service (discouraged).

I may be able to work around the need if I can simply work out when the screen is on at any given time, in the service.

Can anyone suggesting a method call that would return this information? 1.5 upwards.

© Stack Overflow or respective owner

Related posts about android