Adicionar uma nova notificação quando a notificação por push receber (não substituir a antiga)
Estou usando a notificação por push no meu aplicativo. Eu costumava exibir uma notificação quando uma notificação por push é enviada, se eu enviar outra notificação (sem limpar a notificação anterior) ela substitui a nova notificação.
Este é o código que eu uso
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
int icon = R.drawable.ic_launcher;
CharSequence tickerText = "New notification Pending";
long time = System.currentTimeMillis();
Notification notification = new Notification(icon, tickerText, time);
notification.flags = Notification.DEFAULT_LIGHTS
| Notification.FLAG_AUTO_CANCEL;
// Context context = getApplicationContext();
CharSequence contentTitle = "Notifications";
CharSequence contentText = newMessage;
Intent notificationIntent = new Intent(this, LoginActivity.class);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
notificationIntent, 0);
notification.setLatestEventInfo(context, contentTitle, contentText,
contentIntent);
mNotificationManager.notify(1, notification);
mas não quero substituir a notificação, queria adicioná-la como uma nova notificação.