Hi,
I am trying to schedule a background Application at particular interval. When it executes it will fetch data from server and process it. I would like to show message to user if any error/exception occurs.
I searched forum and tried various things to show a Alert Dialog message from my background application but nothing helped. Most of solutions give me "Not in Event Thread Exception"
I referred to
and added following code in my background application.
Code:
synchronized(Application.getEventLock()){ UiEngine ui = Ui.getUiEngine();
Screen screen = new Dialog(Dialog.D_OK, "Look out!!!",
Dialog.OK, Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Manager.VERTICAL_SCROLL);
ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_QUEUE);
}
This does not raise any exception but also does not show any dialog. Please help me or refer me to some code example of similar type.