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
Highlighted
New Contributor
Posts: 4
Registered: ‎03-03-2010
My Device: Curve 8900
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  :-)

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

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()

 

 

 

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Interprocess Communication ...

RuntimeStore and PersistentStore can also be used.

Developer
Posts: 74
Registered: ‎01-03-2010
My Device: Not Specified

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.