09-12-2008 09:57 AM
09-12-2008 11:43 AM
However, I now have two applications on the home screen ribbon. Careful study of the attachments to the knowledgebase article on alternate entry points referenced above reveals that the version of the JDE I'm using (Version 126.96.36.199r) doesn't have the 'none' checkbox on the "Home Screen Position" item on the application tab of the properties screen.
Was this checkbox replaced with something else? I don't find any documented (document version 4.3.0) method of the HomeScreen class that seems to do it...
Any assistance would be appreciated. Thanks in advance.
Checking off the "System Module" checkbox prevents the application defined in that project from displaying an icon.
09-28-2008 08:43 PM
just read your last post but couldn't find such data in any of the file. Is the file you're talking about also generated when building from JDE or only with command-line? if also from JDE, how can I find it?
09-29-2008 04:19 PM
So using the JDE version 188.8.131.52r, it puts it in the same directory as the source files. In my case (I'm a simple man not using many libraries of reusable code and such) all the source for a project is in one directory, say C:\Documents and Settings\a0153103\My Documents\BlackBerry\Code\Sandbox\SlideShow and in there are files like SlideShow.java, SlideShow.jad, SlideShow.jar, SlideShow.cod, etc...
One file, SlideShow.rapc, is some output of the compiler. A sample is shown below:
MIDlet-Vendor: Karl Hartronft
MIDlet-Description: Displays pictures in series on the Blackberry
In this example, there are two entry points for SlideShow, one is MIDlet-1 and one is MIDlet-2. These are the numbers to use (one or the other) in the setRolloverIcon call. For example, in this app I used
HomeScreen.updateIcon(regularIcon, 1); HomeScreen.setRolloverIcon(rolloverIcon, 1);
As I said the other way to determine the right number is to start at 0 and increment a couple of iterations until it works. I did that and it worked at 1. I was then able to match the number to the MIDlet-#.
So the way this works is that there are two names for this app. One, SlideShow, is set to be a system module, auto-run on startup. It doesn't show up on the ribbon but it does get started when the Blackberry resets, without any parms. So after everything is quiet, it sets the regular and rollover icon for the other entry point that is on the ribbon. It goes away after that. The other entry point (they call it an entry point but it actually starts at main like the other one does) is SlideShowUI, and it gets the "gui" parameter when selected by the customer and knows to actually do the customer-desired application work.
Clear as mud?
09-30-2008 11:14 AM
So I did some more testing with a second app, and in both my apps the number is 1.
Also, I had a problem in the 2nd app accessing the bitmap and the sample code I found (and posted above) doesn't check to see if the bitmaps are processed successfuly. You might want to check for null bitmaps because I got a corrupted one and it made both not work.
Also, reset after loading your code, even if you get an exception when loading it. For some reason I got an exception (bad arg as above) but after a reset it worked. This was on the simulator; don't know if it'll be the same on a real device.
09-30-2008 12:11 PM
I actually face this very behavior. The latest app I've developped throws the exception ONLY on first launch right after instal and reboot (it then obviously ignores rollovericon and option provider stuff I implemented there).
Pretty strange actualy as it behaves OK in the sim, throwing the Exception only if a bad index is specified.
On a real device it basically always (whatever the index) throws the Exception but only on first time and not anymore after I reboot...
I tend to think it's not that much related to the index I use... even tried to sequentially use 1, 2, 3, etc. (though your method + simulator gave me the supposed correct index)
I'll do some more investigation...
I'm afraid I might need luck :-)
11-09-2008 11:38 PM
The knowledgecenter article is in error, and this is still a bug which has never been resolved. I get the error sometimes on some hardward, even if compile with the BB JDE.
First, you have to realize (this is NOT in the knowledge base article) that the "index" must be 1, as the index 0 (the default) module is the hidden (system) autostart entry point. It is mdule 2 (ie index 1) that must have an icon. You can easily see this if you just do not mark the first hidden (system), and then give them each distinct titles (such a mod 1 and mod 2).
It would be nice if RIM addressed this bug. It scares users and leads to many unneccessary contacts to support.
RIM are you listening? Even Idea and ToDo Matrix have this issue, and they write quality software!
I wouldn't hold your breath for a fix.
11-13-2008 09:18 AM
You can run into a race condition if the BlackBerry handheld is not restarted when the application is installed (such as when performing an over the air download using the browser). The issue is that the auto start application could run and attempt to set the icon for an entry point that has not been registered with the system (these are happening in parallel). The work around to this is to catch the exception, pause for a short time and try again. This doesn't occur after a reset since the entry points have been registered.
Version 4.7.0 of the BlackBerry JDE and the BlackBerry JDE Plug-in for Eclipse have simplified setting the rollover icon. This can now be done in the project properties and doesn't require any coding. To specify the rollover icon, right click on the project in the BlackBerry JDE, select Properties, click on the Resources tab and add your rollover icon in the Focus icon files section. Note that this also requires BlackBerry handheld software version 4.7.0 and higher.