To start an android background service when the device boots, you should create a broadcast receiver, and make it listen to android.intent.action.BOOT_COMPLETED action. Then in the custom broadcast receiver’s onReceive method, you can start the background service.
Android alarm is a OS built-in service. It provide timer liked functions. With android alarm manager, you can create one time alarm, repeated alarm and so on. This article will tell you how to use it with examples.