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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:59:27+00:00 2026-05-23T17:59:27+00:00

he, i am new to android platform. Now i am developing a small application

  • 0

he, i am new to android platform.

Now i am developing a small application based on notifications.

In my application i am maintaining a timer based on that time every time a notification is displayed.

But the problem is first time notification is displayed and the second notification is appended above the first notification , third notification is append above the second notification………………

I want to display the notifications one by one.

if any one has idea how to display the notification one by one .please reply me.

here is my code

myTimer = new Timer();
        myTimer.schedule(new TimerTask()
        {
        @Override
        public void run() 
        {

            TimerMethod();

        }

    }, 10000,10000);
}

private void TimerMethod()
{

    this.runOnUiThread(Timer_Tick);
}

private Runnable Timer_Tick = new Runnable()
{
    public void run()
     {


        mNotificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
        final Notification notifyDetails = new Notification(R.drawable.icon,"New Alert, Click Me!",System.currentTimeMillis());
        Context context = getApplicationContext();
        CharSequence contentTitle = "Notification Details...";
        CharSequence contentText = "you have a new notification find clicking me";
        Intent notifyIntent = new Intent(Notifi.this,Notifi.class);
        PendingIntent intent = 
            PendingIntent.getActivity(Notifi.this, 0, 
            notifyIntent, android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
            notifyDetails.setLatestEventInfo(context, contentTitle, contentText, intent);
            mNotificationManager.notify(SIMPLE_NOTFICATION_ID, notifyDetails);






    }


};    

Thanks in advance

  • 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-23T17:59:28+00:00Added an answer on May 23, 2026 at 5:59 pm

    Store a fixed amount of time say 5000ms in a variable.

    Now, start the 1st notification and get the current system time. To this add that 5000ms and continue processing. At the end of 5000ms close the notification. If the 2nd notification must be displayed within 5secs of the 1st one, then use a if condition statement and check whether 5000ms have elapsed since the start time of 1st notification. If it has elapsed then display the 2nd one, else wait till the 1st one completes.

    You can also simply check if any notification is open using a simple flag that will be set to 1 when a notification starts and to 0 when it closes. If it is 0, a new notification can be displayed.

    [You may also be able to use 2 threads to do this. On 1st thread run all processes. The 2nd one just interrupts the 1st one at set periods after being started. But haven’t tried out this]

    Hope I was able to help you.

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

Sidebar

Related Questions

I am new to the android platform. Now I am working on TTS(Text to
I am absolutely new to the Android platform and have been building an application
New to Android before I port my application to this platform I wanted to
I know this has been covered elsewhere, but I'm new to the Android platform
Trying to understand the Android framework model. I have an application that needs to
I saw in Android 2.1 highlight it said new platform support: Bluetooth 2.1, New
I'm new to android platform , I'd like to settext using textviews , I
I am new to Android Platform. Please resolve my query how to save &
I am new to Android platform and trying to establish a http request but
I want to develop a application on Android platform to connect to salesforce. From

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.