skip to Main Content

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

2

Answers


  1. This happens because your notifications have the same id.
    When you call NotificationManagerCompat.notify(id,notification),
    use a different id for different notifications.

    Login or Signup to reply.
  2. I’m assuming, each notification replaces the previous one rather than generating its’ own id. Fix that and you’ll be on your way.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search