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 6388461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:16:54+00:00 2026-05-25T03:16:54+00:00

i am new programmer in android application i would like display multiple notifications one

  • 0

i am new programmer in android application i would like display multiple notifications one by one from activity.i have implemented a method to get the notification as follows

       public void myNotify(String message) {

    Log.v("my notification method","from GetNotification class");

    NotificationManager notificationManager = (NotificationManager)       getSystemService(NOTIFICATION_SERVICE);
    Notification notification = new Notification(R.drawable.icon,
            "check the notification", System.currentTimeMillis());
    // Hide the notification after its selected
    notification.flags |= Notification.FLAG_AUTO_CANCEL;

    Intent intent = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse(""));
    PendingIntent activity = PendingIntent.getActivity(this, 0, intent, 0);
    notification.setLatestEventInfo(this, message,
            "for more info run ur app", activity);
    notification.number += 1;
    notificationManager.notify(0, notification);



}

and i have used a string array to display the notifications as a list the following code for display notifications

       String[] msg={"hai","how are you?","wer r u?","what is going on","how is this?","let we talk?","nothing is there","hahaha"}; 
    Thread rt=new Thread(new Runnable() {

        @Override
        public void run() {

            try {

                for(int i1=0;i1<msg.length;i1++){

                    Log.v("", "thread running"+i1);

                    myNotify(msg[i1]);  

                    Thread.sleep(5000);
                }
            } catch (InterruptedException e) {

                e.printStackTrace();
            }
        }
    });

    rt.start();

from above code i would like to display notifications alerts list one by one as follows:

hai

how are you?

wer r u?

what is going on

how is this?

……..

how can i display the String array values as notifications as list

  • 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-05-25T03:16:54+00:00Added an answer on May 25, 2026 at 3:16 am

    Your question isn’t very clear. I think you are asking how you can show notifications and have them remain, so as you show more notifications they do not remove the previous ones. i.e. each time you show a notification it’s added to the list without replacing the existing one. If so, you do that like this:

    notificationManager.notify(0, notification);
    notificationManager.notify(1, notification);
    notificationManager.notify(2, notification);
    notificationManager.notify(3, notification);
    

    By providing a different identifier to each notification, they are displayed separately.

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

Sidebar

Related Questions

As a new android programmer I have my obligatory todo app running. It is
i am a new programmer in android application. how can i concatenate the value
I'm a new Android programmer and recently, a lot of my projects have been
I'm new in android developer ,I'm a programmer Delphi and Lazarus, I have a
I am a very new programmer, I have made a couple basic applications, however
We have 2 new GIS programmer/analyst in our department (new to programming and ArcObjects)
I'm a new Python programmer who is making the leap from 2.6.4 to 3.1.1.
I'm a relatively new Java programmer coming from C++/STL, and am looking for a
relatively new programmer here. Look at the two classes defined below. I'd like to
I am a new programmer of Iphone Application. I work dynamically not use nib

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.