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
New Developer
typerlc
Posts: 10
Registered: ‎08-13-2008
My Device: Not Specified
Accepted Solution

8100 not showing ImageItem in a form (MIDP)

I have a MIDP app that I'm trying to make work with various Blackberry handsets ... right now, an 8100 & 9000.

 

The 8100 is v4.2.1.66 (Platform 2.3.0.57).  I'm using Eclipse, and JDE 4.5.0.

 

It functionally performs fine on an 8100 and a 9000.  But on the 8100, the splashscreen on startup doesn't display.  Technically, the splashscreen is a javax.microedition.lcdui.Form, and the code is basically:

 

 

form.append( new ImageItem( null, Image.createImage("/image.png"), ImageItem.LAYOUT_CENTER|ImageItem.LAYOUT_VCENTER| ImageItem.LAYOUT_VEXPAND|ImageItem.LAYOUT_EXPAND, "alt text" ) );

 

I can confirm there are no exceptions thrown in this code.  But nothing is displayed on the screen (except the Form's title text).

 

The exact same code works fine on the 9000.

 

Further, the exact same code works fine on the 8100 simulator included as part of the JDE 4.5.0.

 

Any suggestions why this wouldn't work on a real device?

 

TIA,

Richard

 

Please use plain text.
New Developer
typerlc
Posts: 10
Registered: ‎08-13-2008
My Device: Not Specified

Re: 8100 not showing ImageItem in a form (MIDP)

To answer my own question ... after looking further through the forum I noticed comments that you can't use newer JDEs with older firmware handsets.  I was using JDE 4.5.0 with an 8100 v4.2.1.

 

After downloading JDE4.2.1 and regenerating the COD file, the splashscreen is now working fine on the 8100, as well as the 9000.

 

RIM, why can't the phones check the version of the JDE when the app is loaded?  That way this problem could be avoided!

 

Richard

Please use plain text.
New Developer
Airport1
Posts: 40
Registered: ‎09-02-2008
My Device: Not Specified

Re: 8100 not showing ImageItem in a form (MIDP)

I have the same problem with an Splash Screen not showing up (it does on a Nokia E90 very well).

Is this problem still true and I have to downgrade the JDE?

Or any workaround available?

 

The data:

MIDP 2.0 Midlet, JDE 4.5.0 and Blackberry 8800

Please use plain text.
New Developer
typerlc
Posts: 10
Registered: ‎08-13-2008
My Device: Not Specified

Re: 8100 not showing ImageItem in a form (MIDP)

You should match the JDE version with the phone software version.   So if your 8800 is earlier than v4.5 ... then you should downgrade your JDE to match.

 

Since you can have both older and newer versions installed at the same time,  there's not much harm in trying it anyway.

 

Good luck.


Richard

Please use plain text.
New Developer
Airport1
Posts: 40
Registered: ‎09-02-2008
My Device: Not Specified

Re: 8100 not showing ImageItem in a form (MIDP)

OMG! I tried and tried different variants to get the splash screen showing up and then it seems to have something to do with the JDE you use ;-)

 

Possible deployment problem: The 8800 I have (but only for testing purposes!) has 4.2.1 - but is it not possible, that other 8800 (the midlet shall run on _ANY_ 8800 of a company) has 4.5.0 or other firmware version?

Please use plain text.
New Developer
typerlc
Posts: 10
Registered: ‎08-13-2008
My Device: Not Specified

Re: 8100 not showing ImageItem in a form (MIDP)

As far as I understand, RIM keep forward compatibility. i.e. if you use JDE 4.2, then it should work on any phone after that. i.e. phone v4.2, 4.2.1, 4.3, etc.

 

But they don't guarantee backwards compatibility i.e. if you use JDE 4.5, it may/will not work on phone v4.2 ... v4.4.

 

So develop on JDE 4.2, and you should be ok unless there is a v4.1 or earlier 8800.

 

I know how you feel too ... I'm not a Blackberry developer ... just ported a MIDP app ... and was suprised that this made a difference.

 

Anyway, give it a go ... maybe that's not really your problem.  You won't know unless you try it.

Please use plain text.
New Developer
Airport1
Posts: 40
Registered: ‎09-02-2008
My Device: Not Specified

Re: 8100 not showing ImageItem in a form (MIDP)

Thank you so much for your response! the test device is an

Blackberry 8800 with 4.2.1.101

 

I downgraded now to JDE 4.2.1 [unfortunately the splash screen is still not coming up] - hm, do I have to downgrade the Blackberry Desktop Manager, too (which is still 4.5)? But as the deployment via BDM took very long (rebooting  device and installing takes around 10-15 minutes?!) it's anyway not my prefered method to test it on the device.

 

Porting a midlet to blackberry is a pain in my opinion. Starting the Emulator takes also some time and then you have to select the app always by hand - is this also normal? I am used the app is directly started by e.g. the Nokia E90 Emulator.

 

 

Please use plain text.
New Developer
typerlc
Posts: 10
Registered: ‎08-13-2008
My Device: Not Specified

Re: 8100 not showing ImageItem in a form (MIDP)

[ Edited ]

Hmmm ... sorry, I don't know what the Blackberry Desktop Manager is.

 

If rebuilding the application, and deploying it with JDE 4.2.1 didn't fix your problem, then I don't really know what your problem is.

 

Does the splashscreen show on the emulator?

 

Are you sure the code is correct?

 

What MIDP classes are you using to display the splashscreen?   Is it anything like the code snippet I posted above?

Message Edited by typerlc on 09-02-2008 08:21 PM
Please use plain text.
New Developer
Airport1
Posts: 40
Registered: ‎09-02-2008
My Device: Not Specified

Re: 8100 not showing ImageItem in a form (MIDP)

The Midlet is the _SAME_ source - which shows the splash screen on a Nokia E90. On the blackberry 8800 the midlet also works completely EXCEPT it seems nothing is painted until all resources are loaded - is this possible? Because I paint the splash and meanwhile I parse / readin a config file. As said, on a Nokia E90 the same source shows the splash while parsing, but on the Blackberry you see NOTHING painted or any output UNTIL the config file was completely read in?

 

Please use plain text.
New Developer
typerlc
Posts: 10
Registered: ‎08-13-2008
My Device: Not Specified

Re: 8100 not showing ImageItem in a form (MIDP)

[ Edited ]

When you say "...meanwhile reading a config file" ... do you mean they are happening in different threads?

 

That may be the source of your issue.  Which thread is displaying the splashscreen?  The main thread?  If you do the splashscreen in a background thread, and read the config in the main thread, then I guess your display won't get updated.

 

If that's the case, can you load the splashscreen in the main thread, and then use callSerially() or use another thread for the config loading.

 

Message Edited by typerlc on 09-02-2008 08:58 PM
Please use plain text.