I am wondering to know how to detect screen dim or brightness on Android 1.6.
I've found a solution on API Level 7. It is easy to develop :
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); boolean isScreenOn = pm.isScreenOn();
But I need a solution for Android 1.x.
Can you suggest me ?
Thanks.
For screen on-off state, you can try with ACTION_SCREEN_ON
and ACTION_SCREEN_OFF
Intent
s, as shown in this blog post: http://thinkandroid.wordpress.com/2010/01/24/handling-screen-off-and-screen-on-intents/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With