Search code examples
androidnotificationstitanium

Can you have several notifications active at once on Android?


I have an application that checks every 30 seconds to see if the user has a new PDF available based on their ids. I can create a notification for one, but when I create another notification for the other it overwrites the first. I want there to be a separate notification for each id. I want it this way because I currently have it set so when the user clicks the notification it downloads the PDF according to the id associated with the notification. Is there a way to do this?


Solution

  • You need to give them unique ID numbers when you call notify(id, notification).

    As a design issue, you might consider stacking them instead of filling up the notification bar. When clicked, you can go to a simple activity that lists available PDFs for download if there is more than one.