开发者

How can I make my BlackBerry java program wait till a core app is opened before proceeding?

My BlackBerry Java program opens the calender app. After that is opened I want it to do something but I currently just use a 250 millisecond delay before that happens. Sometimes the calender take longer or shorter to open. Is there a simple way to use like a Javascript type "While" action in Java for this? Like this English:

Open Calendar

While "calendar is not open" wait

(then the rest of the program a开发者_如何学JAVAfter this)


The method getVisibleApplications() in the ApplicationManager class will return all applications that are currently running and that can come to the foreground. I would repeatedly search through the array that gives you until the Calendar application shows up.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜