View Single Post
Old 06-12-2008, 08:36 AM   #3
EmilieL
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: idk
Posts: 84
Default

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?
__________________
Stop telling me what it can do...
Show me how to make it do it!!!!
Offline   Reply With Quote