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
Posts: 73
Registered: ‎05-03-2011
My Device: 9550
My Carrier: verison
Accepted Solution

how to keep persistStore content after upgrade software?

I use persistObject to store some variable in program, after I modify some function and update the new version to device, I found that the history data has gone. how to keep the history data after upgrade software? my software is autostart in device boot, so to update it you must reboot device.

Author of pairs and Gradient
Developer
Posts: 73
Registered: ‎05-03-2011
My Device: 9550
My Carrier: verison

Re: how to keep persistStore content after upgrade software?

hi, anybody knows about it?

Author of pairs and Gradient
Developer
Posts: 653
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: how to keep persistStore content after upgrade software?

If the size of the object that you are storing changes then it gets erased.

 

If you change the package name where you stored the object then it will get erased.

 

I typically using Strings so they always stay across upgrades.


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Developer
Posts: 73
Registered: ‎05-03-2011
My Device: 9550
My Carrier: verison

Re: how to keep persistStore content after upgrade software?

I found that change size of storage will erase old, so thank you for help.

Author of pairs and Gradient
Developer
Posts: 19,623
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to keep persistStore content after upgrade software?

[ Edited ]

If you change the size of a String, that will change the size of the Object in storage which does not cause this problem, so I think that size change as a general reason for not upgradeable Objects is not accurate.  You will find out more here:

http://supportforums.blackberry.com/t5/Java-Development/How-does-one-upgrade-an-object-implementing-...

 

Edit: This Post is intended to clarify the previous post which said:

"I found that change size of storage will erase old"

rather than the preceding post from JaredCo. 

Developer
Posts: 653
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: how to keep persistStore content after upgrade software?

I should clarify that I meant that changes in custom defined Objects would cause storage to be erased.

Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing