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
New Member
juniorhamish
Posts: 1
Registered: ‎10-22-2012
My Device: Bold
My Carrier: O2

Data Wiped after OTA upgrade?

I have had reports that data that is saved on the device for my app is wiped when upgrading from one version to the next using the BES to push the update.

 

Is this expected behaviour since the previous version is first being uninstalled before the next version is installed?  Is there something I can do to prevent this from happening?  Or is it more likely that the user has done something else to wipe the data and coincendtally only noticed after the upgrade?

Please use plain text.
Developer
simon_hain
Posts: 15,794
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Data Wiped after OTA upgrade?

welcome to the support forum.

if you use persistant storage with custom classes and you change these classes they become invalid and are deleted on an upgrade.

you can avoid this by using sync, either user-triggered by desktop manager or OTA.
To do that extend http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/synchronization/OTASyncCapable...
and enable synchronisation with http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/synchronization/SyncManager.ht...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.