los extras de intento se duplican cuando se usa FLAG_UPDATE_CURRENT en PendingIntent cuando se crean notificaciones de Android
Quiero crear varias notificaciones que inicien una actividad (o la actualicen) para mostrar una descripción del producto.
Notification notification = new Notification(R.drawable.applicationicon,
Resources.getString("NewSaleNotification", context),
System.currentTimeMillis());
// Hide the notification after its selected
notification.flags |= Notification.FLAG_AUTO_CANCEL;
Intent intent = new Intent(context, MainApplication.class);
intent.putExtra("saleid", saleid);
// to be sure the activity won't be restarted
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent,
PendingIntent.FLAG_UPDATE_CURRENT);
notification.setLatestEventInfo(context, SaleTitle, SaleMessage, pendingIntent);
notificationManager.notify(saleid, notification);
Cuando creo el PendingIntent, tengo 4 opciones: FLAG_CANCEL_CURRENT, FLAG_NO_CREATE, FLAG_ONE_SHOT y FLAG_UPDATE_CURRENT.
La definición del último (http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT) es lo que quiero hacer pero no funciona como debería. Si creo 2 notificaciones, ambas tienen el mismo extra 'saleid' que es la última. ¿Cómo puedo hacer más de una notificación con diferente 'saleid' extra?