android - How to detect whether screen is on or off if API level is 4? -
i wondering know how detect screen dim or brightness on android 1.6.
i've found solution on api level 7. easy develop :
powermanager pm = (powermanager) getsystemservice(context.power_service); boolean isscreenon = pm.isscreenon();
but need solution android 1.x.
can suggest me ?
thanks.
for screen on-off state, can try action_screen_on
, action_screen_off
intent
s, shown in blog post: http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/
Comments
Post a Comment