I am creating a TODO list app which accepts Notification time and date. Whenever i add a new scheduled notification my old notification get cancelled and the notification which i entered last alone works. For example: if i set a notification on 1,2,3 minute respectively i only get the final notification that is only one notification after 3 minutes. Can someone explain how to clear this problem. If someone can pls share the code of broadcast and the defining and calling part of notification
CodePudding user response:
This happens because your notifications have the same id.
When you call NotificationManagerCompat.notify(id,notification)
,
use a different id for different notifications.
CodePudding user response:
I'm assuming, each notification replaces the previous one rather than generating its' own id. Fix that and you'll be on your way.