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

Native Development

Reply
Contributor
fazlanzone7
Posts: 26
Registered: ‎11-10-2013
My Device: Z10
My Carrier: Dialog
Accepted Solution

How to launch an app within another app without using invocation framework

suppose if I am developing an app, and I need to launch another app(provide that i have the unique app id) within this app, what is the possible way to do that.

 

I am planning to use threads, and run the other app within a thread. but how do I launch the app(is there any specific methodto call)? what sort of other information do I need except for the app id?

Please use plain text.
Developer
BBSJdev
Posts: 6,090
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: How to launch an app within another app without using invocation framework

[ Edited ]

Invocation would be the way to go, so why can't you you use it?

 

The OS will naturally take care of threading apps and in a more efficient manner than you could provide.

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How to launch an app within another app without using invocation framework

As BBSJdev said, use invocation. You actually have no other option. Each app is in its own secure sandbox, so your first app has ZERO access to the files (data or code) of the other app, except through the mechanisms provided by the operating system. The only such mechanism for third-party devs to use is the invocation framework.

I think you might want to describe your use case for this arrangement. There may be an alternative of which you're not yet aware, which doesn't require you to have two separate apps, or to have the one app directly launch the other, or ... something else we can't think of until we know what you're actually trying to accomplish with this.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Contributor
fazlanzone7
Posts: 26
Registered: ‎11-10-2013
My Device: Z10
My Carrier: Dialog

Re: How to launch an app within another app without using invocation framework

[ Edited ]

Thanks for both the replies.

 

My intention is to grab the controls of the other app (Buttons, textfields) and listen for events on the target app, from the app which I am developing.The final aim is for app testing purposes.

 

If I use invocation framework, would this be possible(if the app which I am developing is running in the background)

 

Since the other app runs in a different process ID, will I get access to the controls of the target app. I just want to know whether it is possible. Any suggession would be highly appreciated. 

Please use plain text.
Developer
BBSJdev
Posts: 6,090
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: How to launch an app within another app without using invocation framework

A quick search on this subject would have shown you that unless you are a trusted partner of BlackBerry you don't have access to the api's needed for this...

http://supportforums.blackberry.com/t5/Native-Development/sys-inject-events/m-p/2575865/highlight/tr...
http://supportforums.blackberry.com/t5/Native-Development/Automatic-Input-Control-sys-inject-events/...

Even the sticky above would have helped...

http://supportforums.blackberry.com/t5/Native-Development/FOSS-Automated-Testing-for-BB10-Cascades/t...

If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Contributor
fazlanzone7
Posts: 26
Registered: ‎11-10-2013
My Device: Z10
My Carrier: Dialog

Re: How to launch an app within another app without using invocation framework

Thank you. One of the linck you provided, lead me to this github page. How has he been able to implement it ? 

 

https://github.com/trulabs/labs-truphone-cascades-test

 

 

Please use plain text.
Developer
BBSJdev
Posts: 6,090
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: How to launch an app within another app without using invocation framework

They would best be able to answer that, but it looks like they have put thin veneers (hooks) over certain functions/signals in Cascades/Native/Javascript that communicate input/output through TCP calls.

I would imagine and from a previous thread discussion with the guy that this takes an awful lot of knowledge and time to accomplish.

I started looking at doing this to test my own app several months ago and concluded the effort wasn't worth the pay off.
Thankfully someone else did. :-)

If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
BBSJdev
Posts: 6,090
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: How to launch an app within another app without using invocation framework

Hopefully at some point BlackBerry will release the automation API to all developers and this will become a lot easier.

If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Contributor
fazlanzone7
Posts: 26
Registered: ‎11-10-2013
My Device: Z10
My Carrier: Dialog

Re: How to launch an app within another app without using invocation framework

Thanks alot for all the information you have provided. It's a great pleasure. A final request from me. I tried finding about how BB10 apps work inside the sandbox, and what sort of limitations thry have. I couldn't find a source for that. If there is any source providing those information, please postit as a reply. Thank you

Please use plain text.
Developer
BBSJdev
Posts: 6,090
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: How to launch an app within another app without using invocation framework

In the case this doesn't answer your question please post a new thread detailing what it is you are looking for and close this one off as the OP has been answered I believe. Cheers.

 

http://developer.blackberry.com/native/documentation/cascades/device_platform/data_access/file_syste...


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.