title: how to increase Number of Count of Notification in android
body: <pre><code>public class GcmIntentService extends IntentService {
      Context context;
      public static final int NOTIFICATION_ID = 100;
      private NotificationManager mNotificationManager;
      NotificationCompat.Builder builder;
      public static final String TAG = "GCM Demo";
      String msg;
      String senderID;
      String recieverID;
      String parameter = "5";
      String time;
      private Handler handler;
  
      int count = 0;
  
      public GcmIntentService() {
          super("GcmIntentService");
          // TODO Auto-generated constructor stub
          handler = new Handler();
      }
  
      @Override
      public void onCreate() {
          // TODO Auto-generated method stub
          super.onCreate();
      }
  
      @Override
      protected void onHandleIntent(Intent intent) {
          // TODO Auto-generated method stub
          // Bundle extras = intent.getExtras();
          msg = intent.getStringExtra("message");
          senderID = intent.getStringExtra("sender_id");
          recieverID = intent.getStringExtra("reccvier_id");
          // parameter = intent.getStringExtra("parameter");
          time = intent.getStringExtra("time");
  
          sendNotification(msg, senderID);
  
          GcmBroadcastReceiver.completeWakefulIntent(intent);
      }
  
      private void sendNotification(String msg, String sender_id) {
  
          mNotificationManager = (NotificationManager) this
                  .getSystemService(Context.NOTIFICATION_SERVICE);
          int params = 0;
          Intent myintent;
  
          if (parameter != null &amp;&amp; !"".equalsIgnoreCase(parameter)) {
              params = Integer.parseInt(parameter);
          }
  
          if (params == 1) {
              myintent = new Intent(this, HomeActivity.class);
              myintent.putExtra("message", msg);
              myintent.putExtra("parmater", 2);
              myintent.putExtra("to_id", sender_id);
              myintent.putExtra("time", time);
          } else {
              myintent = new Intent(this, ChatActivity.class);
              myintent.putExtra("message", msg);
              myintent.putExtra("to_id", sender_id);
              myintent.putExtra("time", time);
  
          }
          PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
                  myintent, PendingIntent.FLAG_UPDATE_CURRENT);
          NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(
                  this).setSmallIcon(R.drawable.lokii_notification_icon)
                  .setContentTitle("Locii Messge").setAutoCancel(true)
                  .setNumber(count++)
                  // .setSound(Uri.parse("android.resource://package_name/raw/sound"))
                  .setStyle(new NotificationCompat.BigTextStyle().bigText(msg))
                  .setNumber(++count).setContentText(msg);
  
          mBuilder.setSound(Settings.System.DEFAULT_NOTIFICATION_URI);
          mBuilder.setContentIntent(contentIntent);
  
          mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
      }
  }
  </code></pre>
  
  <p>here is my Screen : <a href="http://snag.gy/dUFrM.jpg" rel="nofollow">http://snag.gy/dUFrM.jpg</a></p>
  
  <p>This code of Notification I getting Notification in Notification manger . But i am Unable show counter if they sent 5 notification and i didn't read notification .</p>
  
  <p>I am trying using count=0 ;  in Notification builder count++ but i always set 1 while i am sending more than 1 notification My Notification message Updated  But Counter is not Increasing please suggest where i am doing wrong  .</p>