BlackBerry Java™ Development Environment (JDE) 4.0 and later
Many native BlackBerry device applications, such as the Calendar application, use global dialog boxes to alert the BlackBerry device user of an event (e.g., reminder for a meeting appointment). After the notification, it sometimes makes sense for the application that triggers the alert to either come to the foreground or take some action. There are a couple of ways to accomplish this goal.
The first way to have your application become active from a global dialog box is to implement a class that extends the dialog box to either override the onClose() method, or use the button functionality as the trigger (this implementation is similar to the BlackBerry device user choosing to view the calendar appointment when he or she receives the reminder).
Alternatively, your application could implement a DialogClosedListener and attach it to the dialog box being displayed. Assuming an implementation of the DialogClosedListener called MyListener, below is a sample showing how to set up the global dialog box: