I want to get the dim state of the screen from bright,but I don't know how. there are broadcast for screen_on and screen_off,but there is no broadcast for screen_dim,is there any way to get screen_dim? the following way doesn't work: save value at the beginning and check whether the number change afterwards doesn't work,because the return values are always the same and return -1(default value) WindowManager.LayoutParams lpcurrent = getWindow().getAttributes(); if(lpcurrent.screenBrightness==brightAtBeginning) // do something
Asked
Active
Viewed 740 times
1
-
1As far as I can see from Android's source code, there is no broadcast notification send when screen brightness state is changed. refer http://stackoverflow.com/questions/5916213/is-there-an-event-to-detect-when-the-screen-dims – sasikumar Feb 23 '16 at 06:41
-
yeah 3q,i don't know either – lily Nov 24 '16 at 09:53