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

Regular Contributor
Posts: 78
Registered: ‎04-05-2010
My Device: Storm

Message Lister Continously busy

Dear friends,


I am implementing methods given at:




I have tried in Background thread also but when it goes into for(; ; ) loop hourglass appears and make the application hanged, is there other way to implement it.

Please use plain text.
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Message Lister Continously busy

The correct way to do this is by starting a worker thread. Since you say you already did that, you are going to need to post some code in order to get some help.

Please use plain text.
Posts: 905
Registered: ‎02-07-2009
My Device: BlackBerry Torch 9800
My Carrier: Globe Telecom

Re: Message Lister Continously busy

hi mobiledeveloper,

are you doing something with the message after receiving it? if yes, try separating the processing by spawning another thread. so your background thread just listens for the incoming message and then it creates another thread to process the message.



Please use plain text.
Posts: 1,122
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Message Lister Continously busy

May I ask why you are using an empty for loop? The message listener will be invoke each time a messae comes in as long as it is registered, there is no reason for the empy for loop to listen to messages. If this is for sending messages, then make sure you have a sleep inside the for loop and break out of it when a message is ready to be sent.

Please use plain text.