I have an application that allow multiple alarms to be set and it repeats those alarms every day and it is working fine. My problem is when I delete an alarm that was set to be fired at 12:00 a.m. the next day it will be fired at 12:00 a.m even if it is deleted! Anyone know where the problem might be?
I'm using an SQLite to store, retrieve and delete the alarms.
This is part of the AlarmManager
I'm giving every alarm a different request code:
Intent i = new Intent(mContext, Daily_OnAlarmReceiver.class);
i.putExtra(RemindersDbAdapter.KEY_ROWID_DAILY, (long)reminderId);
int Daily_requestCode = reminderId.intValue();
PendingIntent pi = PendingIntent.getBroadcast(mContext, Daily_requestCode, i, PendingIntent.FLAG_CANCEL_CURRENT);
mAlarmManager.setRepeating(AlarmManager.RTC_WAKEUP, when.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pi);
and I'm also doing the same way for the notification. I'm giving every notification a different request code.
Anyone know why the alarm is firing even if I delete it?