Is there an event to detect when the screen dims?
I'm using a SCREEN_DIM_WAKE_LOCK and 开发者_如何学Pythonso my never turns off. It just goes from full brightness to dim.
Is there any way for me to detect when the screen gets dim (event, receiver, etc.) ?
As far as I can see from Android's source code, there is no broadcast notification send when screen brightness state is changed.
If you are using a WakeLock in order to make your screen dim. You can check if the WakeLock is aquired by using the .isHeld() method.
Get the screen Timeout and then take like -5 seconds
精彩评论