I've an activity that, on its onPause has to do some work but not when the screen is turned off.
I've already registered the receiver for the ACTION_SCREEN_OFF intent and, theoretically, this and a static flag at application level should do the trick but... It doesn't work because the onPause callback on the activity is invoked BEFORE the receiver can get its Intent.
That is: logcat*ting* while push down the idle button, i can see the onPause trace first and the onReceive after.
At this point, setting up the static flag is not very important...
Any possibilities to know at activity's onPause time that the screen has turned off?
Thanks in advance
L.