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
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch
Accepted Solution

sharing image/data across Apps

Hi,

I want to share an image/data between two apps running concurrently. These both are different instances of same app through multiple entry points.

-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.
Developer
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch

Re: sharing image/data across Apps

in another way if i had to just share an image file 70x70 then which of the following method will be best?


  • runtime store
  • global event
  • persistent store
-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.
Developer
Developer
CMY
Posts: 1,122
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: sharing image/data across Apps

It depends on how you get the image. Is it a static image that is packaged or a dynamic image that you create/download? How are you updating the image and does it need to be synchronized updates?

Please use plain text.
Developer
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch

Re: sharing image/data across Apps

Its a dynamic image being downloaded and used. No image updation is needed once the other app is launched. But need to update the image at next other app launched.

Its like App1 will download an image and App2 will used that image during its operation. At next App2 launch it will use the latest image downloaded by App1.

-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.
Developer
simon_hain
Posts: 15,846
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: sharing image/data across Apps

i would say a shared picture service in the runtime store would be a good solution.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
sannyo
Posts: 148
Registered: ‎11-16-2009
My Device: Not Specified

Re: sharing image/data across Apps

@simon_hain

I don`t know how will operate the App1 (run at startup or not) but after a restart if the user don`t run the App1 before he/she uses the App2 then the App2 will remain without pictures.

Please use plain text.
Developer
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch

Re: sharing image/data across Apps

@sannyo dont worry App2 will be launched/visible to user only when App1 is launched before.

 

@simon I have already implemented the runtimestore solution and I too think it as the best solution of these three considering that frequency of this scenario will be quite low......besides this  globalevent will require a listener listening for event which will be an overhead as only once that too at start of the App2 the image is needed and persistent store commit/retrieval is i think is more expensive then for runtime store.

 

I have gone for runtime store solution.

 

-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.