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:
Installing the BlackBerry PlayBook SDK will fail on Windows 7 if a 64-bit JVM is installed on the system with an error saying “Win64 not supported”.
An easy way to get the SDK to install is to force the installer to use a 32-bit JDK. This can be done by unzipping the installer. When unzipped, there are two folders (InstallerData and Windows) that are extracted. Inside the Windows folder, edit the file BlackBerryTabletSDK-Air-Installer-0.9.0.201010221500.lax Inside this file is a line that reads:
Edit this line to point to the javaw.exe executable in a 32-bit JVM you have installed. e.g.
Once you have done that, run the installer (BlackBerryTabletSDK-Air-Installer-0.9.0.201010221500.exe) from the Windows directory and the SDK will install correctly on 64-bit Windows.
If you’ve written more than a very simple BlackBerry application, you’ll know that you need to sign most applications with keys obtained from RIM. Getting keys from RIM and signing applications within Eclipse is an easy process and well documented on the BlackBerry web site.
If however you change computers, its a bit more difficult. Depending on what you read you’ll see that the signing keys are tied to a single computer, or you need to request new keys from RIM, or you can just copy keys between computers.
The latter of these is the closest to the truth, but there is still a sting in the tail.
When you move development computers, to move the code signing keys with you, you need to copy the following directory to the new computer.
Once you’ve copied the keys over, you need to import them into Eclipse using the “Import Existing Keys” option on the “Window | Preferences” dialog as shown below.
That appears to be everything you need to do, however if you try to sign some code now, you will get an error back:
The private key is not located in the sigtool.csk file
To overcome this issue, you need to copy the sigtool.csk and sigtool.db files that were copied above into the vmTools folder.
Having followed these steps, you should be able to sign applications on a new computer.
OS 6 is expected to be released in the next calendar quarter.
I like the look of the new OS – RIM seem to have freshened it up nicely, particularly for touch devices, whilst retaining that BlackBerry look and feel.
I recently posted
on how to programatically set the background color using Java within a BlackBerry app.
This technique works fine if you are using Field Managers to add components on to the screen.
If however, your user interface is drawn within the paint(Graphics g) mehod, this technique does not work. In this case, you need to override the paintBackground(Graphics g) method to set the background color.
Setting the background color on a BlackBerry screen is fairly easy. Since JDE 4.6.0, the BackgroundFactory class can be used to accomplish this.