title: Notification inbox style however gets updated when a notification comes
body: <p>I am trying to make a notification style where I want all notification would under one hood and they will be shown line wise. If a new notification comes, it should be under the second latest. The list of notification should be of 5, that means only latest 5 will be displayable.</p>
  
  <p>I am using this below code for this, I don't know how to achieve this, I tried my hands StackBuilder too however I got that, this would work from higher API than I am using one now.</p>
  
  <pre><code>NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
  Intent notificationIntent = new Intent(this, GcmActivity.class);
  notificationIntent.putExtra("title", messagetype);
  notificationIntent.putExtra("message", msg);
  PendingIntent intent = PendingIntent.getActivity(this, 0,notificationIntent, 0);
  notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
          | Intent.FLAG_ACTIVITY_SINGLE_TOP);
  
  NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this).setSmallIcon(R.drawable.ic_launcher)
          .setContentTitle("MY MESSENGER").setContentText("MESSAGES");
  NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();
  inboxStyle.setBigContentTitle("MESSAGES" + " Details");
  
      inboxStyle.addLine(messagetype + ":" + msg);
  
  
  mBuilder.setStyle(inboxStyle);
  mBuilder.setContentIntent(intent);
  mBuilder.setAutoCancel(true);
  notificationManager.notify(Integer.parseInt("0"), mBuilder.build());
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ejfRI.png" alt="Target Design"></p>
  
  <p>I know I can do this by adding any number of line while creating </p>
  
  <pre><code>NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();  
  </code></pre>
  
  <p>However I want that when ever my GCMIntentService will be called, this list will be updated.</p>
  
  <p>I tried the work using this below code as well however that did not work either</p>
  
  <pre><code> NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
  Intent notificationIntent = new Intent(this, GcmActivity.class);
  notificationIntent.putExtra("title", messagetype);
  notificationIntent.putExtra("message", msg);
  PendingIntent intent = PendingIntent.getActivity(this, 0,notificationIntent, 0);
  notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
          | Intent.FLAG_ACTIVITY_SINGLE_TOP);
  
  
  
  NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(  
          this).setAutoCancel(true)  
          .setContentTitle("MY MESSENGER")  
          .setSmallIcon(R.drawable.ic_launcher)
          .setContentText("MESSAGES");  
  
   NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();  
  
  for(int j= 0; j&lt;listMessage.size(); j++)
    inboxStyle.addLine(listMessage.get(j));  
  mBuilder.setStyle(inboxStyle);
  mBuilder.setContentIntent(intent);
  notificationManager.notify(0, mBuilder.build());
  </code></pre>