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
Contributor
Posts: 21
Registered: ‎03-30-2012
My Device: os6
My Carrier: 9780
Accepted Solution

can two uiapplication in one application,or on application and one uiapplication

exampleSmiley Surprisedne class extends Application , new a Uiapplication when i listened something happen ,can i do ?

i try it ,but hava a runtimeexception(104) , anyone can help me ?

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: can two uiapplication in one application,or on application and one uiapplication

no.
maybe you can describe what you want to achieve in more detail, i am pretty sure there is a way to do it.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
Posts: 21
Registered: ‎03-30-2012
My Device: os6
My Carrier: 9780

Re: can two uiapplication in one application,or on application and one uiapplication

invoke.invokeapplication(type,args),this method must be in a uiapplication ,if i use uiapplication i need create blackground icon or acceptsForeground() return false.
1.i don't want create a icon ,because my application type is lib
2.if i make acceptsForeground() return false ,it can't be requestForeground()

so now i make all code in a application (which is extends Application),but invoke.invokeapplication(type,args) can't work ,
i use EventInjector.invokeEvent keycodeevent instead it ,

can you tell me some better way,thanks...
Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: can two uiapplication in one application,or on application and one uiapplication

invoke does not work from an application? that's news to me.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
Posts: 21
Registered: ‎03-30-2012
My Device: os6
My Carrier: 9780

Re: can two uiapplication in one application,or on application and one uiapplication

if the invokeapplication (type ,args),args !=null,if hava a CastException ,
but if it in a uiapplication ,everything is ok
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: can two uiapplication in one application,or on application and one uiapplication

I think it would be better if you could clarify what you are trying to achieve, rather than specifying the technical way you think you can do it. 

 

In general however, I believe you can use ApplicationManager to launch a new UiApplication from any code, including an Application 'listener', if that is what you are trying to do.