Example below shows how to create a BroadcastReceiver which is able to receive BOOT_COMPLETED events. This way, you are able to start a Service or start an Activity as soon device was powered up.
Also, you can use BOOT_COMPLETED events to restore your alarms since they are destroyed when device is ...