How to display multiple notifications in android

Solution 1:

just replace your line with this

 notificationManager.notify(Unique_Integer_Number, notification);

hope it will help you.

Solution 2:

Simple notification_id needs to be changable.

Just create random number for notification_id.

    Random random = new Random();
    int m = random.nextInt(9999 - 1000) + 1000;

or you can use this method for creating random number as told by tieorange (this will never get repeated):

    int m = (int) ((new Date().getTime() / 1000L) % Integer.MAX_VALUE);

and replace this line to add parameter for notification id as to generate random number

    notificationManager.notify(m, notification);