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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Contributor
bb_master
Posts: 4
Registered: ‎03-03-2010
My Carrier: AirTel

Interprocess Communication ...

Hello Friends,

 

I am working on an application pair, in which one application is a background application and another is a foreground application that user can launch from ribbon. My need is enable them to communicate with each other.

 

I am quite new to this programming environment. Can you please help me by telling, what all ways are there for IPC. Please list all available options, (no matter how tricky it can be) for IPC, since I need to evaluate every option.

 

Online pointers will be additionally appreciated.

 

Thanks,

 

BB_Master

 

-The Master of all Blackberries at all times  :-)

 

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008

Re: Interprocess Communication ...

Does this have to be two apps? You can run a background thread and a UI thread easily on the BB platform.

 

If not, then the only real option is global events.

 

See GlobalEventListener and ApplicationManager.postGlobalEvent()

 

 

 

Please use plain text.
Developer
Developer
CMY
Posts: 1,119
Registered: ‎02-10-2009
My Carrier: Verizon

Re: Interprocess Communication ...

RuntimeStore and PersistentStore can also be used.

Please use plain text.
Developer
jack_black
Posts: 74
Registered: ‎01-03-2010

Re: Interprocess Communication ...

There are two standard ways for inter process communication in BlackBerry: 1. Use global events: make processes as globalEventListener and interactions are done by invoking and detecting global events with Unique event ID (a unique key of long datatype ). It provides maximum two data and two objects to exchange/share through global event. ......for more check the RIM example code regarding globalEventListener 2. Use runtime store: place your process in runtimestore using unique key and you can invoke it from other process using that key in runtimestore. You can also place shared object there..check RIM examples. You can also share saved data/pbject from persistence store using invoking the key. For only interaction globalevent would be best.
Please use plain text.