Skip to main content

Success! LWUIT on Blackberry

Posted by wsnyder6 on July 9, 2008 at 3:41 PM PDT

This will be short and sweet.

To work around a race condition (see this thread), LWUIT needs to run on a separate thread on the Blackberry. Taking this into effect, together with a modified LWUIT distribution (removing references to M3G helper classes and the 3D Transition classes), I've finally got the demo to work on a simulator.

Granted, this in the JDE, not NetBeans. I need to figure that out yet.
In the JDE, make sure you have the modified LWUIT dist set up as a library type project, and then make your a LWUIT midlet project dependent on that library.

Oh yeah, since LWUIT really relies on the presence of soft keys, you may want to use the BlackBerry UiApplication class to catch key events and wheel events, then translate those to the corresponding UI action. But you can also keep the same q/w and o/p softkeys in place.

Proof that it works!

bb_lwuit.png

Related Topics >>

Comments

Hi needed LWUIT code

I am facing the problem while porting J2ME project to blackberry "Application entry point" exception i feel LWUIT is required compatible to blackberry please help on the same my mail id is supreethvh@gmail.com

hii im sivasankar there is no complete information in implementing the blackberry application over LWUIT. i need the ful details reg- running and implementing in NetBeans. i even followed certain steps which given in netbeans forum,its no use.making my netbeans dump.it not working. im stil stuck up.try to help me over this problem. With regards Sivasankar.p

hii im sivasankar there is no complete information in implementing the blackberry application over LWUIT. i need the ful details reg- running and implementing in NetBeans. i even followed certain steps which given in netbeans forum,its no use.making my netbeans dump.it not working. im stil stuck up.try to help me over this problem. With regards Sivasankar.p

Hi! I need the code too :P davidapu@gmail.com Thanks

Hello wsnyder6, It would be great if you can mail some sample code to amedikonda@gmail.com. Thanks Anil

i need the code lwuit with run in blackberry, please publish it to another mobile developer that use lwuit component for their GUI..it's so important to us, to know how the lwuit can run in blackberry device.. thanks..:)

Hello wsnyder6, can you please send me too the sample code and steps, thanks, daniel daniel@macropro.com.mx

I promise that as soon as my LWUIT app gets out the door, I will drop some more code and examples. Look for it in the next week or so...

Hi wsnyder6, woult it be possible to get some sample code and steps , thanks, kunal sood28@yahoo.com

Did you get the code or tut,

Did you get the code or tut, can you mail it to me also at nimit_love1@gmail.com What I want is the same currently I am not able to start the application created in J2ME with LWUIT UI, when I port it, there is a ref member out of range error every time.. please help me.. Thanks.

Done

Can u pls provide me a small SAmple code and Steps to run , Thanks milan mailid :milanexe@yahoo.co.in

Hi wsnyder6 , I am also trying to run LWUIT on Black berry JDE . The code is compiling , but when i am runing the emulator hang. Can u pls help me on the same Thanks Milan

Hello,
You will need to make it yourself by removing the M3G dependent classes from the base LWUIT dist. (Unzip the LWUIT jar, delete the classes, and zip it back up).

Good, may I ask where/how to get the modified LWUIT distribution? Thanks.

I haven't tried loading this demo on the actual device yet. I will update this entry when I do.

That's great. How easy now is it to update a real blackberry with LWUIT?

Yes, this is what I saw, on a midlet, the UIApplication instance is not null.

No, because you can use the default application instance. Though, be warned, I have read in the Blackberry dev forums that this is not officially supported.

UiApplication.getUiApplication().addTrackwheelListener(myTrackwheelListener);

That's interesting but if you do that won't your app become a non-midlet app not suitable for LWUIT?

You need to catch Wheel-clicks with the Blackberry UiApplication class and translate them to LWUIT actions.

Haven't tried moving the wheel around yet since I've been working in the simulator.

Are you able to use the wheel to move around? Are you able to push the wheel button to trigger an action?