Posts of people trying to register a broadcast receiver in the manifest for events SCREEN_ON and SCREEN_OFF are numerous. The solution was given many times: register it in the java code.
My question is: WHY?
This makes no sense to me... And makes no sense to many others, as we can see:
- Android broadcast receiver not working when trying to receive bootcomplete or screen off
- android: broadcast receiver for screen on and screen off
- Android - how to receive broadcast intents ACTION_SCREEN_ON/OFF?
- Why my BroadcastReceiver doesn't work?
Does anyone have any insight?