03-13-2010 04:35 PM
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?
Solved! Go to Solution.
03-13-2010 05:29 PM
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.
03-13-2010 05:30 PM - edited 03-13-2010 08:08 PM
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.
03-15-2010 04:14 AM
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).