1

We are developing an application that should trigger an alarm intent notification start at 8AM everyday and repeat for every 15 mins once

In the notification, we are having button called "EOD", clicking on this should cancel the alarm and should not trigger any more for that day. But again next day morning it should start at 8AM.

The issue is after click on "EOD", we are calling cancel(intent) to cancel the alarm. But the alarm is not triggering for the next day. How to again trigger the alarm at next day 8AM ?

Deva
  • 39
  • 1
  • 5

1 Answers1

0

After you cancel the repetitive notifications using the intent. Create another intent and send it ot alarm manager to start at next day 8am.

Sid
  • 146
  • 1
  • 9
  • What about requestcode in pendingIntent..can i use same 0 as pending intent...... Intent intent = new Intent(getApplicationContext(), NotificationAlarmReceiver.class); alarmIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); – Deva Jun 22 '17 at 19:39
  • Request code must be different for each alarm you create – Sid Jun 23 '17 at 15:14
  • I have created another intent with different requestcode when click on "EOD" , its triggering alarm next day 8AM but the problem is again when click on "EOD" for the next day, its not cancelling because its with different request code. – Deva Jul 10 '17 at 05:06