I\'m trying to get a BroadcastReceiver invoked when the screen is turned on. In my AndroidManifest.xml I have specified :
Following sage advice from CommonsWare I have elected to try to remove the long-living Service and use different techniques.
Actually, I believe my advice was more of a light blue... :-)
But I still need to detect the screen off and on events.
There are certain events that Android does not want to start up new processes for, so the device does not get too slow from all sorts of stuff all having to run at once. ACTION_SCREEN_ON is one of those. See this previous question for light blue advice on that topic.
So, you need to ask yourself, "Self, do I really need to get control on those events?". The core Android team would like it if your answer was "no".