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 after 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.