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
Regular Contributor
salmankhan7788
Posts: 52
Registered: ‎02-26-2013
My Device: Curve 9650,Bold 9900
My Carrier: Airtel

Background Thread with UI

 

Hello

  I have worked on an app like birthday reminder, here i need ui and background thread simultaneously (a thread that is starts running after installing app and always running in background not affected by ui (open or close) runs untill the app uninstalled thrad that always check update in database silently in background .

Please use plain text.
Developer
simon_hain
Posts: 16,102
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Background Thread with UI

this should help:
http://supportforums.blackberry.com/t5/Java-Development/Create-a-Background-Application/ta-p/445226
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Regular Contributor
salmankhan7788
Posts: 52
Registered: ‎02-26-2013
My Device: Curve 9650,Bold 9900
My Carrier: Airtel

Re: Background Thread with UI

Thanks simon_hain

 I already checked this code but this is not my need actully i have develope a ui app (with some screen) in which a thread is always running in backgroung. If  application is starts or close it wil not affect this thread.Thread should be running continusly in background until the in uninstalled..

Please use plain text.
Developer
simon_hain
Posts: 16,102
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Background Thread with UI

this can be achieved by using an alternate entry point:
http://supportforums.blackberry.com/t5/Java-Development/Set-up-an-alternate-entry-point-for-an-appli...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
peter_strange
Posts: 19,602
Registered: ‎07-14-2008
My Device: Not Specified

Re: Background Thread with UI

An alternative approach is to have one application and not allow the user to exit the UI.  So instead of closing the screen, just do a

<application>.requestBackground().

 

The user will see the app in the task switcher. 

Please use plain text.