I am creating a notification at particular time using alarm Manager and notification manager, i gave user three action in notification bar "Snooze", "Cancel", "Take". Here is the situation i want to resend the notification after 10 min of this notification again and again till the user presses these above buttons. Can any body help and provide a decent logic to do this.
Asked
Active
Viewed 42 times
1 Answers
1
I would schedule a repeating Alarm and only cancel it on a non "Snooze" action. See the setRepeating method of AlarmManager
to schedule a new alarm after the initial one goes off, you'll want to start a service with the AlarmManager which can then handle the Snooze action for you.
-
1Yes i can setRepeat but the problem i am facing is that i am already using setRepeat for repeating for regular days. – Mukesh Gupta Oct 24 '16 at 20:32
-
I was thinking when user presses any button i will again set new alarm for after some time(say user presses snooze after 10 min ) so i will using alarmmanager.set function for this – Mukesh Gupta Oct 24 '16 at 20:33