I have an app which extends Application - in other words, it has no UI.
If it fails, I need to display a dialog to the user before quitting. So I use the following code:
public void message(String text)
UiEngine ui = Ui.getUiEngine();
Screen screen = new Dialog(Dialog.D_OK, text, Dialog.OK,
ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_QUEUE);
The problem is, if I do:
message("Error - exiting application");
...the dialog box flashes up and disappears. I guess this is because there is no app owning the dialog.
Is there a way to wait until OK has been pressed before exiting?