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: 554
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor
Accepted Solution

How persistent is persistent storage

The API says:

 

"The persistent store provides a means for objects to persist across device resets. A persistent object consists of a key-value pair. When a persistent object is committed to the persistent store, that object's value is stored in flash memory via a deep copy."

 

Does that mean that this storage is "never" destroyed/cleared except if I clear it programmatically? It does survive a battery change for example?

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: How persistent is persistent storage

It should survive a battery change, if power fails, if you reboot the phone, etc. All except for you programmatically changing it, your app being uninstalled, or the device being wiped.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Developer
Posts: 77
Registered: ‎01-27-2010
My Device: Bold 9000
My Carrier: AT&T

Re: How persistent is persistent storage

[ Edited ]

From what I have been told it survives everything except OS upgrades.  The RecordStore will survive everything including OS upgrades but it's less robust.

 

Edit: Also, the previous poster stated that it will be deleted if the app is deleted.  This is partially true.  If the object you are storing in the PersistentStore had its interface defined in your app then it will be deleted with your app.  If not it should stay on the device.  So for instance if your application stores a String that String will persist even if your app is uninstalled.

Highlighted
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: How persistent is persistent storage

I belive that objects stored in the Persistent Store can survive an OS upgrade if your application interfaces with the SyncManager correctly (see the net.rim.device.api.synchronization package).