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

  • Home
  • SEARCH
  • 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 8732117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:22:44+00:00 2026-06-13T09:22:44+00:00

I am using the below code to generate the notification in my application @Override

  • 0

I am using the below code to generate the notification in my application

@Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mContext = MainActivity.this;

        notifManager = (NotificationManager) mContext.getSystemService(mContext.NOTIFICATION_SERVICE);

        mNotification = new NotificationCompat2.Builder(mContext).setSmallIcon(android.R.drawable.sym_def_app_icon)
                .setTicker("Launch download").setContentTitle("Downloader").setContentText(content)
                .setContentIntent(getPendingIntent());

        mNotification.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE);
        mNotification.setAutoCancel(true); 
        notifManager.notify(UPDATE_PROGRESS, mNotification.build());


    }

    private PendingIntent getPendingIntent() {

        Intent i = new Intent(mContext, NotificationReceiver.class);
        //i.setFlags(FLAG_ACTIVITY_CLEAR_TOP);
        return PendingIntent.getActivity(mContext, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);
    }

Note:- I am using NotificationCompat2 by Jake Wharton.

Now this code works fine except when a new a Notification arrives it dismisses the old notification even if it is not read by the user.

My Question

How to show all the notification in the status slidingdrawer till it is not read by the user?

  • 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-13T09:22:45+00:00Added an answer on June 13, 2026 at 9:22 am

    A notification will be replaced by another if they have the same id. Change the id in

    notifManager.notify(id, mNotification.build());
    

    to display several notifications.

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

Sidebar

Related Questions

I'm trying to generate a fixed length hash using the code below. public int
I am using below code to generate photo gallery from a folder. How can
I'm using the below code to generate a horizontal bar. It works in older
I wanted to generate a list view using below code. But after running this
Im trying to generate a color gradient using ColdFusion. My current code below works
I am using below code to generate random numbers in range... int randomNumberWithinRange(int min,int
I am using below code to generate word document using assp.net/c#.net, please tell me
I have integrated the below code in my application to generate a 'pdf' file
Hi i using this mysql code to generate this data below: code: SELECT L.LEAVETYPE,
I am trying to generate the below code via T4. using System; using MyDAL;

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.