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
Developer
radpin
Posts: 21
Registered: ‎07-15-2008
My Device: Not Specified
Accepted Solution

Shared data between applications

Hello everyone!

 

I'm writing a small application, and I wanted to split the user interface into two applications to minimize clicking around. But they have a lot of data in common, so I was thinking that maybe I should have a third application that just handles the push / pull aspect? How exactly do I (if it's possible to) share data between two applications?

 

An XML document or something like that would be perfect. Maybe a couple of images if I'm really lucky.

Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Shared data between applications

Use "Persistent storage" to save data, use the same object in your other application also. Please refer to "Storing Persistnant Data" in "BlackBerry_Application_Developer_Guide_Volume_2.pdf".

 

Thank you.


Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Shared data between applications

I would also suggest RuntimeStore if the data does not need to be persistent and if the images get large, then look to put this on the SD Card.  You might also consider RMS Store, though for a native Blackberry application, the other options are probably better. 

 

You can store an XML document in all these places, but that means you will be parsing it each time you need to get some data from it and/or update some details in it.  PersistentStore and RuntimeStore are object storage, so you could store the parsed object, which might be more efficient. 

 

The suggestions so far only apply if the data is dynamic, if the data is static (such as code and fixed images), then you can create a shared Library that is used by both applications. 

 

I think all of these options are discussed to some degree in the Developer Guide, I would suggest you have a skim through that. 

Please use plain text.
Developer
radpin
Posts: 21
Registered: ‎07-15-2008
My Device: Not Specified

Re: Shared data between applications

Peter,

 

Thanks so much for the information that's exactly what I was looking for.

Please use plain text.