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

Reply
New Contributor
Posts: 2
Registered: ‎04-05-2012
My Device: Blackberry curve 8520
My Carrier: Vodafone
Accepted Solution

Issue with pushing screen from a background application

Hi,

 

I have developed an application with an alternate entry point. I have the main GUI application and a background application that listens for push notifications. The background listener auto starts when the device is turned on and listens for push. When it receives the push message it displays a popupscreen with options 'launch' and 'cancel'. Pressing on 'launch' should open the GUI application by pushing the main application screen. However, I receive 'ClassCastException' and I have no idea why.

 

I have looked around and the process is similar to what I have done but it somehow is not working for me. Can anyone explain or show me how to push screen from a background application?

 

Cheers!

Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Issue with pushing screen from a background application

Welcome to the forums!

 

I suppose you push a global [and maybe modal] popup screen to display "launch" and "cancel" buttons. When you press "launch", then, you should not simply push a screen - you should actually launch the main application!

 

In order to do that, you should create an application descriptor with the appopriate parameters and tell ApplicationManager to run it. Take a look at ApplicationManager documentation, especially the part titled "Running an application with different arguments". Make sure the arguments are as needed for your main application, not the background one.

 

One problem: what if your main application is already running but minimized? Do not worry - trying to run the same application with the same arguments will activate the already running one!

 

Good luck!

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
New Contributor
Posts: 2
Registered: ‎04-05-2012
My Device: Blackberry curve 8520
My Carrier: Vodafone

Re: Issue with pushing screen from a background application

Thanks. That was exactly what I was looking for. I resorted to pushing screen because I could not find how to launch app from the background.

 

Cheers!