It's a background thread, lauched at the startup of the blackberry.
It listens for incoming messages from a server.
When the server sends a specific message, I want the mainscreen of the app to be pushed.
I have no problems sending data to the screen but I can't seem to be able to push it...
Here's what I tried :
Code:
mMainMenu = MainMenu.getMainMenuInstance();
net.rim.device.api.ui.UiApplication.getUiApplication().pushScreen(mMainMenu);
mMainMenu.PlayAlarm();
Exception thrown: @1EDC4000 java.lang.IllegalStateException
Code:
TempDisplay instance = new TempDisplay();
instance.enterEventDispatcher();
mMainMenu = MainMenu.getMainMenuInstance();
mMainMenu.PlayAlarm();
java.lang.RuntimeException: application already running in this process
Code:
mMainMenu = MainMenu.createMainMenuInstance();
mMainMenu.init();
net.rim.device.api.ui.UiApplication.getUiApplication().pushScreen(mMainMenu);
mMainMenu.PlayAlarm();
This one doesn't throw exceptions but nothing happens..
Any other ideas?