Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8325043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:17:52+00:00 2026-06-09T00:17:52+00:00

I am trying to recieve multiple notifications on my mobile.But each time i send

  • 0

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 Id's for notifications I am doing that also but I don’t know where I am going wrong.

Here’s how I create my notification.(It is being created in a service).

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++;
}

Where HelloID increments to recieve multiple notifications with unique id’s.Please tell me where I am doing wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:17:56+00:00Added an answer on June 9, 2026 at 12:17 am

    So the issue is that the intent you’re using is the same each time. If you try to notify the user using an Intent that is the same as one used in a notification that is already being displayed, android considers them duplicates. This is because each notification when clicked will end up doing the exact same thing (so android is like “why do I need to display two of these?”).

    The thing to do is say “hey, am I already displaying a notification? If so, I’m going to create a new notification that will override the current one, but convey the fact that there are actually two things that I’m notifying about”. Consider the text messaging application. When you get a second unread text message, it overrides the first notification about the original text message and replaces it with a notification tell you that you have two new text messages. Make sense?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

just been trying to recieve the session value from multiple jquery ajax requests on
I'm trying to get a simple send and receive UDP program working, but I'm
I am trying to send an HTML mail through PHP, but I can't seem
I'm trying to send multiple emails based on a boolean value in my database.
I'm trying to multiply two arrays without using numpy. But, I receive an error
I'm trying to send and receive using pipes: send.cpp struct { long a; long
I am trying to develop the XMPP Gateway which can send/receive from standard XMPP
i'm trying to build a semi file sharing program, when each computer acts both
I'm currently trying to do multiple inserts from an access database to a remote
Good evening guys, I'm trying to pass multiple checkbox values through AJAX and process

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.