Mukesh Gupta Mukesh Gupta - 7 months ago 51
Android Question

How to Call a java class after 10 minutes of non-interacting with notification bar?

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.


I would schedule a repeating Alarm and only cancel it on a non "Snooze" action. See the setRepeating method of AlarmManager,%20long,%20long,

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.

Using Alarmmanager to start a service at specific time