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.
01-11-2009 03:15 PM
Which is the best way to upgrade an application without loosing the data in the Persistent Store? Probably it should be as easy as downloading the new app and replace the old one. But based some tests that I've made, in some situations the data in the Persistent Store is lost after the application is updated and the device is restarted. (this happens for example when using the 4.1 7290 simulator) So, how should the application update process work in theory (when is the data deleted and when not), and how does it work on the actual device?
Solved! Go to Solution.
01-11-2009 03:58 PM
If you pass your own objects like com.yourcompany.MyClass to the persistent store they will be removed when you uninstall your application.
If you use common classes like java.util.Vector they will remain in persistent memory even if you uninstall your app.
I do not tell you to use only common classes, it is a bad approach. It is better to save your own class instances.
To preserve your data - do not uninstall old application, just install the new app over the old application.
01-11-2009 03:59 PM
Also make sure that your new app uses the same long keys as the old application uses.
And classes which instances you want to load are exactly the same as in old application, including full qualified names.
01-15-2009 08:57 AM
As long as the persistent classes that hold your data have not been changed, the data should remain after it has been upgraded. If you modify these classes the data will be lost during an upgrade.
If you need to modify your persistent classes you could create a new class. The updated application could read in the old classes, convert to the new ones and then save them to persistent store.
02-24-2010 02:30 PM
If we do not change the version number that appears in the jad file, our RMS data persists. If, however, we increment the version number, our application data is lost when we update/upgrade our app (even if no other changes were made). We've tested this numerous times changing "only" the version # that appears in the jad (e.g. 220.127.116.11 to 18.104.22.168) and that single change is the difference between the data persisting and the data being lost. Does anyone have any thoughts on why this might be?