On a BlackBerry, the indication panel at the top of the display can be used to display alerts to the user.
Typically this is used to display status changes such as new email messages, new facebook messages or new news feed items etc.
Since OS 4.6, BlackBerrys have had the ability to easily add entries to the notification area. The image on the left shows a BlackBerry Torch with 2 indicators.
To add an indicator into the notification area, requires that an icon be loaded and stored in the ApplicationIndicatorRegistry and then displayed with an optional numeric value next to it.
To register the indicator icon, use the following code:
This piece of code loads the image indicator.png from the application and stores it in the ApplicationIndicatorRegistry. The parameters to the register() method are:
- The ApplicationIcon to register
- Boolean flag indicating whether to display an icon only or whether to display a numeric value alongside the icon.
- Boolean flag indicating whether the application indicator is visible when first created.
Once the icon has been loaded and stored in the registry, it can be updated easily in the notification area: