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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 48
Registered: ‎06-30-2010
My Device: 9000
My Carrier: Non

How to upgrade Blackberry Application from old version to new??

Hi All, I'm developing a background application. In that we maintaining many persistent storage. The Question is, How to get the persistent values from the old version to new version while upgrading the app.
Developer
Posts: 17,026
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to upgrade Blackberry Application from old version to new??

if you store the values in a generic object without using custom persistable classes the contents should be retained.

if this does not work you could implement SyncItem to allow the user to backup the settings.
----------------------------------------------------------
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
Contributor
Posts: 48
Registered: ‎06-30-2010
My Device: 9000
My Carrier: Non

Re: How to upgrade Blackberry Application from old version to new??

Please can u provide me the sample code ..

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to upgrade Blackberry Application from old version to new??

Contributor
Posts: 48
Registered: ‎06-30-2010
My Device: 9000
My Carrier: Non

Re: How to upgrade Blackberry Application from old version to new??

Actually i know about persistent storage. But my problem is , if i upgrade the Application all persistent data getting loss in new version app . I need that old persistent data values in new version app also.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to upgrade Blackberry Application from old version to new??

[ Edited ]

One of the things you should know about persistent store is that if the classes you put in PersistentStore change with the new Application, then you have rendered the data in the old class unreadable, so your only option is to delete the app (deleting the old class data) and install the new app.   

 

So use generic classes or make compatible changes and you will be able to upgrade your app. 

 

For example, if you persist a HashTable, and you add String values to it, then this doesn't change regardless of the number of String values you add.  But if you store a custom class and you add another variable to that class, then it has changed and will be incompatible.

 

Does that help?

Contributor
Posts: 48
Registered: ‎06-30-2010
My Device: 9000
My Carrier: Non

Re: How to upgrade Blackberry Application from old version to new??

Thanks a lot Smiley Happy ... I got it....

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to upgrade Blackberry Application from old version to new??

Solved?  if so can you mark it as Solved?  instructions in the Help lenk near the top of the screen.