Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
JavaCrazei
Posts: 17
Registered: ‎04-22-2009
Accepted Solution

Screen Navigation Problem

Hi,

I am new to BB Java Application development and facing problem related to screen navigation.

 

I have two Screens in my application. One is Dashboard having a Icon , and on pressing this Icon user should be able to navigate to the other screen. I have created both the screens separately , now when I try to integrate the same i.e. when I create instance of one screen in other screen I am getting exception as : java.lang.RuntimeException: application already running in this process

 

Both the screens are extending from UiApplication.

 

So could anyone please  help me to sort this thing out ?

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008

Re: Screen Navigation Problem

You do not extend UiApplication for a screen. You extend Screen (or one of its subclasses, like MainScreen).

 

Your Application class should extend UiApplication.

 

Please see the numerous examples of this in the sample programs that ship with the JDE.

 

 

Please use plain text.
Developer
JavaCrazei
Posts: 17
Registered: ‎04-22-2009

Re: Screen Navigation Problem

Thanx RexDoug,

 

So you mean the first screen which comes after clicking the Application Icon should only be extended from UiApplication ?

Please use plain text.
Developer
JavaCrazei
Posts: 17
Registered: ‎04-22-2009

Re: Screen Navigation Problem

Thanx RexDoug,

 

So you mean the first screen which comes after clicking the Application Icon should only be extended from UiApplication ?

Please use plain text.
Developer
JavaCrazei
Posts: 17
Registered: ‎04-22-2009

Re: Screen Navigation Problem

Thanx it done :smileyhappy: ...

 

But I have 1 more problem I am not able to go back to my original screen when I press back Button on BB.

Do I need to Push my dashboard screen on key listener for this ?

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008

Re: Screen Navigation Problem

If you are extending MainScreen, the "back" button is already wired up to close the screen.

 

If you push screen #2 on top of screen #1, then close screen #2, screen #1 now comes to the top of the screen stack and is displayed.

 

If you are extending FullScreen you will have to wire up the keys yourself. I recommend overriding keyChar in the screen class.

 

 

 

 

Please use plain text.
Developer
JavaCrazei
Posts: 17
Registered: ‎04-22-2009

Re: Screen Navigation Problem

Thanx a lot Rex :smileyhappy: .. its done :smileyhappy:
Please use plain text.