I have used the below code to set the alarm,
mAlarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
activeModeTime.getTimeInMillis(), AlarmManager.INTERVAL_DAY,
getActiveModeAlarmPendingIntent());
Every time when my app starts in the Home screen activity I am setting the alarm again and again.
I know that all scheduled alarm will be cancelled once the device goes power off. Once the power is on all the alarms will be scheduled again.
But I don't know how to check the alarm has been scheduled already or not every time when the app start.
And also please confirm the below, Setting again again and again once the app starts will replace the old alarm and will be fired if the time passed already. How to avoid of this multiple alarm setting by check the alarm scheduled or not programmatically?
Please help me on this.