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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:37:38+00:00 2026-05-16T04:37:38+00:00

I am creating a multiple stop watch application for which there will be multiple

  • 0

I am creating a multiple stop watch application for which there will be multiple timers running parallel, and each notification binded to each timer.

I am able to create multiple timers with the following code.

private void updateNotification(int notificationId, int clockStatusID, CharSequence text) {
   // notificationManager.cancel(notificationId);
    // throws up an ongoing notification that the timer is running
    Log.i("TIMERCOUNT", "Notification id: " + notificationId);
    Notification not = new Notification(clockStatusID, // the
        // icon
        // for
        // the
        // status
        // bar
        text, // the text to display in the ticker
        System.currentTimeMillis() // the timestamp for the
        // notification to appear
    );
    Intent intent = new Intent();
    intent.setClassName("com.intuit.time_catcher.android.activities",
    "com.intuit.time_catcher.android.activities.Tabs");
    not.setLatestEventInfo(self,
        getText(R.string.timer_notification_title),
        getText(R.string.timer_on_notification_text), PendingIntent
        .getActivity(this, 0, intent,
            PendingIntent.FLAG_UPDATE_CURRENT));
    not.flags += Notification.FLAG_ONGOING_EVENT;
    not.flags += Notification.FLAG_NO_CLEAR;
    notificationManager.notify(notificationId, not);

}

The following is the problem that im facing.
Consider there are 3 timer running and 3 notifications in the status bar. When i update timer 2, notification 3(which is at the rightmost end) gets updated, but what i really want to do is to update the second notification(middle one).
When i print the notification id’s, im seeing the right values.
I cant comprehend why am i getting this weird behavior?

  • 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-16T04:37:39+00:00Added an answer on May 16, 2026 at 4:37 am

    It sounds like your intents are cached (which is the factory default)

    Try adding a unique setAction('anystring'+timestamp) or a count value, it must be unique as explained in this question

    intent.setAction("actionstring" + System.currentTimeMillis());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider a process which is creating multiple application domains. Do these Application domains share
I have an ASP.NET MVC3 application in which I am creating multiple areas, is
I am creating multiple video panels using vlcj. For each video window I should
I have a very large script which is creating multiple views. In a number
I am currently creating an application for compiling multiple java projects in one go
I am creating multiple associations in one go and there are a few problems
I am creating multiple tabs dynamically when my application starts up. Put it this
imagine a (container-) application is creating multiple classloaders to host a couple of other/sub-
I have a program that is creating multiple files. There is a function for
Most often when creating multiple classes inside a program that use each other, I

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.