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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:41:13+00:00 2026-05-19T05:41:13+00:00

I am running into a strange issue with notification icons in my application. My

  • 0

I am running into a strange issue with notification icons in my application.

My application sends and receives data via bluetooth. When the application is started it creates a notification icon of the application (icon.png). It will then see there is no bluetooth device connected and change the icon to (warn.png). The issue is, when the status bar at the top shows warn.png, under the on-going notification drop down it has the origional icon (icon.png) with the text “No Bluetooth Device connected”. When a bluetooth device does connect, the status bar icon changes back to the origional icon (icon.png) but under the on-going notification it has the warn icon with the message “Connection Established”.

Below is the code I used:

private void notification_updates(String DISPLAY_TEXT, String ONGOING_TEXT, int ICON) {
Intent intent = new Intent(this,GUI.class);
intent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK | intent.FLAG_ACTIVITY_SINGLE_TOP);

try
{
    notification.setLatestEventInfo(Monitor.this, "App_Name",ONGOING_TEXT, 
            PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT));
    notification.icon = ICON;
    notification.tickerText = DISPLAY_TEXT;
    notification.flags = notification.FLAG_ONGOING_EVENT; //on going events
    notification.flags += notification.FLAG_NO_CLEAR; //no clear.

    mManager.notify(APP_ID, notification);

} catch(Exception e)
{
    Log.e(TAG, "Failed to Notifiy the notification manager (create):\n" + e.toString());
}

}

  • 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-19T05:41:14+00:00Added an answer on May 19, 2026 at 5:41 am

    Try creating a whole new notification, and see if that properly updates the icon in the content view.

    Alternatively, if that doesn’t do it for you, create a custom content view: http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomExpandedView

    Then, on your RemoteViews object, setImageViewResource to update your icon, setTextViewText to update the text, and set the notification.contentView to be your RemoteViews object. I’ve had success with this properly updating both the icon in the status bar, as well as the icon/text in the expanded task bar.

    Tangentially, I noticed your code has notification.flags += notification.FLAG_NO_CLEAR. I believe since this is a bitmask you want |= instead of +=

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

Sidebar

Related Questions

I have a navigation controller based application and I'm running into a strange issue
I am running into a very strange issue and I am convinced it is
I am running into a strange issue in perl that I can't seem to
I'm running into a strange issue on Vista with the Performance monitoring API. I'm
I am running into a strange issue with 'parfor' in Matlab. Most of the
I believe these 2 lines are equivalent but after running into a strange issue
In working on passing a table type around, I’m running into a strange issue
I'm running into this strange issue. Basically I have a loop that loops forever,
We have a strange issue with running an Facebook IFrame application (using MVC 2).
I am running into a strange issue. I have a dropdown list that contains

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.