开发者

How to execute application continuously without hangs device in blackberry

I have created an application of contacts synchronization. when i run it on device it hangs my device while synchronizing then i am not able to open another application, I am also doing auto synchonization with in a perticular period of time.

I want that synchronization should be perform without hang to device and if i get any interrupt i.e. a开发者_JS百科ny call while syncing then it should pause for that moment and continue at call end. How can i do this ?


I dont know how this is working for Blackberry, but may be an example for Eclipse RCp is helping you.

You have the choice to execute a Runnable between

The thread which calls this method is suspended until the runnable completes.

Display.getDefault().syncExec(runnable);

The caller of this method continues to run in parallel, and is not notified when the runnable has completed.

Display.getDefault().asyncExec(runnable);

In your case you have to make the decision if you can start the job in asynch mode.

When you ar enot sure, whether your job is executed in asynch mode, you should implement some outputs to the console including timestamp.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜