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

Posts: 41
Registered: ‎04-24-2012
My Device: storm
My Carrier: blackberry

Event loop in Blackberry java

Hi Im new to in developing in blackberry. Im trying to port my android code in blackberry Im just gonna ask how can you use a eventloop in blackberry java? because here in android its android.os.handler. Tnx in advance

Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Event loop in Blackberry java

[ Edited ]

Welcome to the forums.


From my experience, you can't convert Android Event Handling directly into how the BlackBerry Java code manages its events.  You need to completely rework that aspect of the processing, which is a little problematic if you are not familiar with the way that Events are processed in BlackBerry.  Unfortunately I think the best advice I can give you is to spend some time working on understanding how the Blackberry works internally using BlackBerry code and then decide how you are going t convert your application. 


You will find you need to throw away almost all your screen UI interaction too.


If you make use of 9patch, search the forum for a reference to code that someone here wrote to enable reuse of he assets.  In my experience, these can be successfully reused in Blackberry, which is a saving.  The business and data logic classes can similarly be reused.  It is the UI and the Event handling code that needs to be re-written.