Send multiple notifications androidle
<p>I am trying to recieve multiple notifications on my mobile.But each time i send the notification.The previous notification gets overwritten by the new one.I watched the other questions where they said to have multiple <code>Id's</code> for notifications I am doing that also but I don't know where I am going wrong.</p>

<p>Here's how I create my notification.(It is being created in a service).</p>

<pre><code>private void GenerateNotification(String data)
{
    String ns=Context.NOTIFICATION_SERVICE;
    manager=(NotificationManager) getSystemService(ns);

    int icon=R.drawable.ic_launcher;
    long when = System.currentTimeMillis();

    Notification notification = new Notification(icon, data, when);
    notification.flags |=Notification.FLAG_AUTO_CANCEL;
    notification.defaults |= Notification.DEFAULT_SOUND;
    Context context = getApplicationContext();
    CharSequence contentTitle = "The Best Essay";
    CharSequence contentText = data;
    Intent notificationIntent = new Intent(this,MainActivity.class);
    PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);

    notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
    manager.notify(HELLO_ID, notification);
    HELLO_ID++;
}
</code></pre>

<p>Where HelloID increments to recieve multiple notifications with unique id's.Please tell me where I am doing wrong.</p>
