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
Highlighted
Contributor
Posts: 26
Registered: ‎11-10-2013
My Device: Z10
My Carrier: Dialog
Accepted Solution

Can I invoke another app within a thread of an app?

If I invoke another app within a thread of an app, will I be able to get access to its resources(Controls etcSmiley Wink.? If I invoke without a thread does the target app get a different process id?

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Can I invoke another app within a thread of an app?

Didn't you ask this already? Smiley Happy

 

No there is no access to another app's resources unless that app has specifically implemented an invoke action that gives that up (e.g. the picture app returning an image).

 

Using Momentics process view would show you the id is different.

 

Nice try though, keep thinking. Smiley Happy

 


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

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

Re: Can I invoke another app within a thread of an app?

BBSJdev, the first time he asked, he was looking for a way other than invocation. Now that we've said invocation is his only option, he's just wondering whether it could let him do any of the sort of thing he was trying to do, with really tight integration.

Your answer is correct though, of course... invocation is a loose form of integration, and the other app runs as an entirely separate process with no sharing between them like that.

There are some things that could be done though. I believe shared memory is one option, and of course you can use a FIFO or UDP or TCP or such things to connect the apps other than merely through the invocation data and response. Still not the same process...

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!
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Can I invoke another app within a thread of an app?

Peter,

I did put a smiley after it to indicate it wasn't a serious comment.

Your suggestions are valid, as an alternative, but he did specifically signal out invocation in the OP and that's the question I answered.

I think we're all guilty of missing the jist of a question sometimes, or being too pedantic in our answers, sometimes even over-answering a question.

However logically if your suggestions can be implemented then so can an invocation method.
I have the feeling he wants an app that can control any app not just his own.


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

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

Re: Can I invoke another app within a thread of an app?

[ Edited ]

Hi to both of you. Yes as peter9477 mentioned, I was thinking of a way to use invocation framework for my purpose because that was the reply I got for my last question.

 

And as BBSJdev mentioned, yes my intention is to control any app with what I am developing. 

 

If signals emiitted from the target's app can be sent to my app with some mechansim, then that is what i am searching for. WIth all the replies I got, I have understood that it's not going to be an easy task(or it is impossible).

 

But if there is any method that would help me at least to get closer, then I just want to try it out. Do you think that I can implement a FIFO or TCP connection from my app to the target app, and make this happen?

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Can I invoke another app within a thread of an app?

Unless the receiving app has been set up to catch and interpret them I'm afraid not.

So there are lots of different ways of approaching this if you control both sides of the communication (i.e. both apps).

For communicating with other dev's apps you are limited to what they implemented (and currently the most published is for invocation).

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

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

Re: Can I invoke another app within a thread of an app?

Since BBSJdev guessed right in thinking you want to control any app, the answer is easy: you cannot.

The system security is effectively fool-proof in this respect. You simply have no options, aside from the automation API which they have chosen not to make available to anyone except close partners (such as the carriers, for use in making specialized technical support apps).

If you want something that can "control" your own apps from another app that you write, then some of the ideas I gave are still options. Note however that it would be an entirely "cooperative" form of "control"... the victim would be in effect be pretending to be controlled through the interface you define, but it would in effect be controlling itself.

Don't bother looking for some tricky end run around this... you won't find one, sadly. (Many of us have asked for something like this for automated test purposes, maybe to be used solely in Development Mode, but that seems unlikely to happen in the foreseeable future.)

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!
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Can I invoke another app within a thread of an app?

If you are really serious about this then ether pester BlackBerry to allow you access to the automation api's or create a library that dev's can link in to their apps (similar to the FFOS one) that allows your app to control.

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

Developer of stokLocker, Sympatico and Super Sentences.