Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Posts: 14
Registered: ‎09-04-2011
My Device: BlackBerry Bold 9700 + PlayBook
Accepted Solution

Clearing Banner Indicator after receiving PUSH data

I current receive PUSH notifications and am able to update the app icon with a red flag and create a top notification icon using the showBannerIndicator from the API.


Does anyone know how to use removeBannerIndicator to clear the notification icon from the top bar?


To generate the notification icons when I receive PUSh I use:


function onData(data) {
  try {
		return 0;
    catch (err) {

 To clear the home screen icon I do the following after the user has opens the app in the foreground to access the info:


function handleForeground() {
	inBackground = false;
	// Reset the app icons.
	blackberry.app.setHomeScreenIcon("local:///images/iconno.png", true);


I tried using blackberry.app.removeBannerIndicator() within that function hoping it would clear the icon until it receives a new PUSH but that clearly isn't working. The API documentation isn't very helpful either.


Hope someone could be of help on this.


Posts: 14
Registered: ‎09-04-2011
My Device: BlackBerry Bold 9700 + PlayBook

Re: Clearing Banner Indicator after receiving PUSH data

Ok, figured this one out.


I create a seperate function and use that everytime the listen page comes to the foreground by doing a document load call:



  function whatever(){


So each time the app comes to the foreground upon receiving a push, the first thing it does is clear the icon from the banner.


Hope this help someone who had a similar problem.