Add a new notification when push notification is received (not replace the previous)

You can also use System.currentTimeMillis() to assign unique id to your notification.

int id = (int) System.currentTimeMillis();
mNotificationManager.notify(id, notification);

You need to supply a different ID as the notification ID each time. The best approach would be to send an ID field to GCM which can be then accessed via Intent.getExtras().getInt() in your GCMIntentService's onMessage() method.

If this is not possible, I'd suggest using something like (int)Math.random()*10 to generate a random integer number as your notification ID. This will (partially) ensure that your notifications will not replace each other.


simple you have to

change Notification id

  mNotificationManager.notify(1, notification);

instead of 1

for more refer this Link