Agregar una nueva notificación cuando se reciba una notificación de inserción (no reemplazar la anterior)
Estoy usando notificaciones push en mi aplicación. Solía mostrar una notificación cuando recibo una notificación de inserción. Si envío otra notificación (sin borrar la notificación anterior), esta reemplaza a la nueva.
Este es el código que 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);
pero no quiero reemplazar la notificación, quería agregarla como una nueva notificación.