I'm sorry to re-open this old thread but I have the same problem and I don't understand what is the right way.
In the link above I don't find the solution, I find "... because broadcast receiver not work when screen light off ...", so I don't understand if it works or not when screen is off
Are you using BroadcastReceiver library ??
Do it works also when screen is off ??
Can you post a little code ??