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
Jacul
Posts: 51
Registered: ‎04-01-2009
My Device: Not Specified

Re: Losing Persistent Object on Upgrade of application

I am also curious about how to persist data even if the app is deleted.API reference notes that an app's data would be wiped after the app was deleted.
Please use plain text.
Developer
MANDRESS
Posts: 18
Registered: ‎10-25-2008
My Device: Not Specified

Re: Losing Persistent Object on Upgrade of application

Not sure of your use case (i.e. why you'd want to do this) but one way to do it is to keep the data in a cod file.  Another way would be to write it to a file.
Please use plain text.
Developer
RLord321
Posts: 343
Registered: ‎02-23-2009
My Device: 8700 | 8310 | BOLD | STORM

Re: Losing Persistent Object on Upgrade of application

MANDRESS,

 

It may be "working" but is that the solution you want?  Storing it in a String object means when people remove your application, the XML you stored as a String in the store will remain forever.  These eats up the available storage capacity of their blackberry and they will have a tough time removing it without wiping their blackberry.

Please use plain text.
Developer
MANDRESS
Posts: 18
Registered: ‎10-25-2008
My Device: Not Specified

Re: Losing Persistent Object on Upgrade of application

If that is the case then I guess Jacul has another option. :smileyhappy:
Please use plain text.
Administrator
MSohm
Posts: 14,517
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Losing Persistent Object on Upgrade of application

The following link explains how data is handled when an application is removed.

 

How To - Handle stored data when removing an application
Article Number: DB-00424

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800708/800647/How_To_...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
MANDRESS
Posts: 18
Registered: ‎10-25-2008
My Device: Not Specified

Re: Losing Persistent Object on Upgrade of application

Mark

 

The article is not clear whether the upgrading rule applies to PersistentStore as well as RMS Database.

 

So to be clear.  If someone extends the String object to their own package and uses the PersistentStore then on an upgrade the

data will remain and on a delete of the application the data will be removed.  Is this correct?

 

Thanks

 

Mark

Please use plain text.
Administrator
MSohm
Posts: 14,517
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Losing Persistent Object on Upgrade of application

As long as the members of a persitsable class have not changed the persistant data should be available after an application is upgraded.  The RMS RecordStore follows the rules outlined here:

 

 

Support - RMS Record store does not persist after a MIDlet has been upgraded
Article Number: DB-00095

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800792/801083/Support...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.