Search code examples
javaandroidandroid-studioandroid-notificationsalarmmanager

Adding new notification without deleting the old notification for my app in android studio


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


Solution

  • I'm assuming, each notification replaces the previous one rather than generating its' own id. Fix that and you'll be on your way.