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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:26:19+00:00 2026-06-11T15:26:19+00:00

Before Notification.Builder came into existence the way to update a notification that was already

  • 0
  • Before Notification.Builder came into existence the way to update a notification that was already in the notification tray was to call setLatestEventInfo() and then send the notification back through the NotificationManager.notify() call with an ID that matches the first notify() call you made.

  • Now setLatestEventInfo() is deprecated with the message: Use Notification.Builder instead. But I cannot find any documentation about how to properly update a notification using Notification.Builder.

  • Are you just suppose to recreate a new Notification instance every time you need to update the notification? Then simply pass that to NotificationManager.notify() with the ID you used before?

  • It seems to work but I wanted to see if anyone had any official verification that this is the new “way to do this”?

There real reason I am asking this is because in Android 4.1.1 Jelly Bean, the notification now flashes everytime notify() is called. When updating a progress bar with setProgress() this looks really bad and makes it hard to tap on the notification. This was not the case in 4.1 or previous versions. So I want to make sure I am doing this correctly before I file a bug.

  • 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-11T15:26:20+00:00Added an answer on June 11, 2026 at 3:26 pm

    I resolved this issue by calling setWhen(0) on my Notification.Builder. It seems Android’s default value for this argument doesn’t suit updating bits of the notification view without the entire notification fading out / in.

    Notification.Builder builder = new Notification.Builder(c)
                    .setContentTitle("Notification Title")
                    .setSmallIcon(R.drawable.ic_notification_icon)
                    .setProgress(max_progress,current_progress,false)
                    .setWhen(0);
                    notification = builder.getNotification();
    
    mNotificationManager.notify(NOTIFICATION_ID, notification);
    

    Update:

    As WolframRittmeyer stated, using when=0 is not an elegant way. I formed a solution like following:

    if(mNotif == null) {
    //either setting mNotif first time
    //or was lost when app went to background/low memory
        mNotif = createNewNotification();
    }
    else {
        long oldWhen = mNotif.when;
        mNotif = createNewNotification();
        mNotif.when = oldWhen;
    }
    mNotificationManager.notify(NOTIFICATION_ID, mNotif);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing an agent to send late in notification for 2 days before today
I have an application that starts an ongoing notification and then completes a process.
I am making an app that will fire a notification 30 minutes before an
Is there a way to get a notification before Current of a BindingSource changes
before I start I want to point out that I tagged this question as
Before asking the question let me preface with the fact that I am new
Before I ask my question, I want to mention that I am only today
Before saying anything I have to say that, albeit I'm an experienced programmer in
Before I ask the question let me state that I have attempted to google
I have class ParentClass that observes an NSNotification. ParentClass handles the notification. ChildClass inherits

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.