Are you talking about adding this feature to the android android alarm app or about your own alarm app?
I suggest you take a look at the Clock source ( packages / apps / DeskClock / src / com / android / deskclock ) from your android source and understand how the app has an alarm / alarm function. There is an alarm, because alarms that can be set using the alarm manager system cannot withstand a reboot of the device.
source
share