Welcome!

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

Java Development

Reply
Regular Contributor
anawara
Posts: 64
Registered: ‎04-27-2010
My Device: Bold 9000
My Carrier: Vodafone

ApplicationIndicator not showing in OS 6

Hi guys,

 

My application uses the ApplicationIndicator class to notify users of messages in their inbox. The application is developed on JDE 4.6. When the application starts the following code is executed

ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance();
EncodedImage mImage = EncodedImage.getEncodedImageResource("icon-n.png");
ApplicationIcon mIcon = new ApplicationIcon(mImage,true);
if (reg.getApplicationIndicator()==null) {
     reg.register(mIcon, false, false);
}

 

Once a notification is pushed to the user's phone the following code is executed

ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance();
ApplicationIndicator appIndicator = reg.getApplicationIndicator();
appIndicator.setValue(1);
appIndicator.setVisible(true);

 This code works perfectly on OS 4.6 and 5.0. However, when this code runs on 6.0+, the indicator isn't displayed.

 

I've done some digging around and have come around this article about application indicators in OS 6. The article states "Applications can add their own indicator icons to the home screen.  However, unless they also add a custom message the application will not be included in the notification summary as shown in the following screenshot." The article the goes to show how you can add a summary message to the notifications summary tray.

 

Now the problem is I'm compiling for OS 4.6 but I need to also support OS 6+. Is there a way to show the indicator in OS versions 6+ without including a summary message to the notifications summary tray?

 

Thank you in advance

 

Please use plain text.
Developer
simon_hain
Posts: 15,947
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: ApplicationIndicator not showing in OS 6

as far as i know the article says that your application will not be visible in the summary list. your indicator icon should be visible.
i would suggest that you debug your code and check if there are any exceptions etc.

also check the instance the code is running in, if you register the indicator in an autostart entry point it may not be available in the main application.
we resolved that by using the runtime store to save and retrieve the indicator.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Regular Contributor
anawara
Posts: 64
Registered: ‎04-27-2010
My Device: Bold 9000
My Carrier: Vodafone

Re: ApplicationIndicator not showing in OS 6

There are no exceptions being thrown..

 

I've checked the object returned from both calls to ApplicationIndicatorRegistry.getInstance() and it is the same. Furthermore, I've checked the process ID after both calls and it is also the same.

 

One interesting point though is the debugger does not stop at the breakpoint that I've set for the second call (the one that displays the icon).

 

Do you have any idea what that might mean?

Please use plain text.
Developer
simon_hain
Posts: 15,947
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: ApplicationIndicator not showing in OS 6

it could mean that the code on device and IDE is no longer in sync, clean and redeploy should fix that.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.