Reputation: 401
I am setting the FLAG_INSISTENT
to my notification to repeat the sound of the notification. My problem is that I do not know how to stop the sound after five minutes to save batteries.
I already tried to cancel the notification, but there the user will not see the notification after that.
This is how I add the FLAG_INSISTENT
:
Notification note = mBuilder.builder();
note.flags = Notification.FLAG_INSISTENT;
mNotifM.notify(AppConfig.NOTIFICATION_ID, note);
I already had the idea to cancel the notification after five minutes and creating a new one with no vibration and sound. Is there any other possibility to stop the sound after five minutes?
Upvotes: 2
Views: 590