I am new to android. I was going through the manual, and read following:
Registered alarms are retained while the device is asleep (and can optionally wake the device up if they go off during that time), but will be cleared if it is turned off and rebooted
Can the alarm be saved in the app. If yes Can you please tell me how.
Can you please provide me with the code.
This should get you going.
In short, you relieve your app from keeping a watch on the alarm itself.
Instead you tell the system to keep track of it for you, and just create a class that should be awoken by the system once the alarm goes off.
http://www.vogella.com/articles/AndroidServices/article.html#scheduleservice_scheduling