how can i call background application from ui Application+blackberry

瘦欲@ 提交于 2019-12-08 10:43:24

问题


i am trying to make a uiapplication If i click on a button then a background thread must start which should run even when my application is exited how can i do that

I created a background thread but it gets stop when the app exits.


回答1:


Create your application as a system module that starts automatically and runs in the background. You can have an alternate entry point that will pass an argument to the main app to start your GUI. When you exit the GUI it won't exit the entire application.




回答2:


Create 2 seperate project - making one dependent on the other if need be.

Then use GlobalEvents and GlobalEventListener to communicate between them when the one is in the foreground and the other in the background



来源:https://stackoverflow.com/questions/2920839/how-can-i-call-background-application-from-ui-applicationblackberry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!