title: Android: Multiple Notifications as single list in Status Bar
body: <p>I am trying to <code>Notify</code> user based on some criteria. <code>Multiple Notifications</code> are being shown in <code>Status Bar</code> but I want to <code>Group the notification in single notification</code> and when user clicks in the <code>Status Bar</code>, I want to retrieve all notifications in that group. Is that possible? Or I have to maintain <code>PendingIntents</code> of those notifications? Any help will be appreciated. For example, if birthdays of two friends come on same day, then 2 notifications should be shown. I want to combine these notifications i.e. instead of 2 notifications in the status bar, I want one, when user clicks on it, it should have information about 2 notifications. Is it possible?</p>
  
  <p>Please see the code below for displaying notifications.</p>
  
  <pre><code>public void displayNotification(BirthdayDetail detail)
      {
          NotificationCompat.Builder builder = new NotificationCompat.Builder(this.context);
          builder.setSmallIcon(R.drawable.ic_launcher);
          builder.setContentTitle(detail.getContactName());
          builder.setContentText(detail.getContactBirthDate());
  
          Intent resultIntent =  new Intent(this.context, NotificationView.class);
          resultIntent.putExtra("name", detail.getContactName());
          resultIntent.putExtra("birthdate", detail.getContactBDate());
          resultIntent.putExtra("picture_path", detail.getPicturePath());
          resultIntent.putExtra("isContact", detail.isFromContact());
          resultIntent.putExtra("notificationId", notificationId);
  
          if(detail.isFromContact())
          {
              resultIntent.putExtra("phone_number", detail.getPhoneNumber());
          }
  
          PendingIntent resultPendingIntent = PendingIntent.getActivity(this.context, requestCode++,
                  resultIntent, PendingIntent.FLAG_UPDATE_CURRENT);
          builder.setContentIntent(resultPendingIntent);
  
          notificationManager 
                      = (NotificationManager) this.context.getSystemService(Context.NOTIFICATION_SERVICE);
          notificationManager.notify(notificationId, builder.build());
          notificationId++;
      }
  </code></pre>