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.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 17
Registered: ‎04-22-2009
My Device: Not Specified
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 ?

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

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.

 

 

Developer
Posts: 17
Registered: ‎04-22-2009
My Device: Not Specified

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 ?

Developer
Posts: 17
Registered: ‎04-22-2009
My Device: Not Specified

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 ?

Developer
Posts: 17
Registered: ‎04-22-2009
My Device: Not Specified

Re: Screen Navigation Problem

Thanx it done Smiley Happy ...

 

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 ?

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

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.

 

 

 

 

Highlighted
Developer
Posts: 17
Registered: ‎04-22-2009
My Device: Not Specified

Re: Screen Navigation Problem

Thanx a lot Rex Smiley Happy .. its done Smiley Happy