I have a Broadcast Receiver which handles multiple events. I need it to do some special things for me at boot so I registered the android.intent.action.BOOT_COMPLETED
intent, which works fine. If the device is plugged in and is charging the android.intent.action.ACTION_POWER_CONNECTED
intent is fired before BOOT_COMPLETED
and does work before it's supposed to do stuff. (I'm using BOOT_COMPLETED
as a sort of initializer).
Is there a way to check if the BOOT_COMPLETED
event has been fired, so that I can run my initializing code in the event something gets fired too early?