java – How to set alarms with AlarmManager?


I write Alarm Application for Android now. I want to set more alarms with the help of AlarmManager. How can I do it? As far as I know, I have to use PendingIntent with a different request code to set certain alarms. I was trying to increment a static variable and I did it, but if the user reloads the application, the variable has a request code equal to zero. How to set alarms even after reloading my application?