title: Multiple notification handling
body: <p>I'm having trouble in figuring out the <strong>Intent</strong>, <strong>PendingIntent</strong> <strong>Filters</strong> and <strong>Flags</strong> for notifications. </p>
  
  <p>Notification are working and are getting generated as they should, but the problem is only the last notification created keeps the <strong>Bundle Data</strong>.</p>
  
  <p>I want all notification to keep the <strong>Bundle Data</strong> of each notification in it until a user click on them. </p>
  
  <p>Consider an application for a moment when different user send you a message a new notification gets created and when you click on any notification the app launches and takes you to some specific Activity. I want the same thing but when there are more than one notification the last notification keeps the <strong>Data</strong> where as previous notification loose their <strong>Bundle Data</strong> and <strong>Intent</strong>. </p>
  
  <p>There is another thing which <strong>Filters</strong> to use to restrict the app from launching a new instance of <strong>MainActivity</strong> everytime a notification is clicked at.</p>
  
  <p>The <strong>Notification_ID</strong> are different for each notification.</p>
  
  <pre><code>public class AlarmSchedulingService extends IntentService {
  private NotificationManager mNotificationManager;
  public AlarmSchedulingService() {
      super("SchedulingService");
  }
  
  protected void onHandleIntent(Intent intent) {
          Bundle extras = intent.getExtras();
          sendNotification(extras.getInt(KEY_EXTRAS_NOTIFICATION_ID));
  }
  
  public void sendNotification(int NOTIFICATION_ID) {
  mNotificationManager = (NotificationManager) this
              .getSystemService(Context.NOTIFICATION_SERVICE);
  Intent intent = new Intent(this, MainActivity.class);
  intent.putExtra(keyName, extraData); 
  intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
  
  PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
              intent,  PendingIntent.FLAG_UPDATE_CURRENT);
  
      // use the right class it should be called from the where alarms are set
      NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(
              this)
              .setAutoCancel(true)
              .setSmallIcon(R.drawable.ic_launcher)
              .setContentTitle(titleString)
              .setStyle(
                      new NotificationCompat.BigTextStyle()
                              .bigText(messageString))
              .setDefaults(
                  Notification.DEFAULT_SOUND
                  | Notification.DEFAULT_LIGHTS)
  
              .setContentText(messageString);
          mBuilder.setContentIntent(contentIntent);
  
      mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
       }
   }
  </code></pre>