title: A few questions about the notification
body: <p>I have a few questions.
  1. when I send a notice that it replaces the old.
  I need to increment a counter notification.</p>
  
  <ol start="2">
  <li><p>how to do that when you click on the notification to open certain fragment?</p>
  
  <p>private static void generateNotification(Context context, String message,int type) {</p>
  
  <pre><code>    String title = null;
      int icon = R.drawable.ic_stat_gcm;
      long when = System.currentTimeMillis();
      NotificationManager notificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
      Notification notification = new Notification(icon, message, when);
      title = context.getString(R.string.app_name);
      Intent notificationIntent = new Intent(context, MainActivity.class);
      notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
      PendingIntent intent = PendingIntent.getActivity(context, 0, notificationIntent, 0);
      notification.setLatestEventInfo(context, title, message, intent);
      notification.flags |= Notification.FLAG_AUTO_CANCEL;
      notificationManager.notify(0, notification);
  
  }
  </code></pre></li>
  </ol>