Blackberry build not retaining persistent storage during reinstall

25 views
Skip to first unread message

nir...@nvsoft.com

unread,
Sep 3, 2013, 7:40:13 AM9/3/13
to codenameone...@googlegroups.com
Hi Shai,

I have a blackberry build done using the build server. This app writes some data to the storage using the Storage APIs. During the time same app is being run and closed, it maintains the data. However, if I re-install the app(i.e replacing the app again) - it does not find the data written by earlier app. Do I need to set some special flags for it to retain the data across application re-installs?

Thanks,
Nirmal

Shai Almog

unread,
Sep 3, 2013, 2:27:44 PM9/3/13
to codenameone...@googlegroups.com, nir...@nvsoft.com
Hi,
a new build of the app or exactly the same app?

If its a new build I would guess you used externalization and relied on the value of getClass().getName()/getCannonicalName() for the object id.

There are no special permissions necessary for something like that.

Nirmal Juthani

unread,
Sep 4, 2013, 1:19:35 AM9/4/13
to Shai Almog, codenameone...@googlegroups.com
I tried with exactly the same app.

Also I am using the a static string for the externalization.

Any other thing, which I can check? Somehow when the app is reinstalled, the Storage is not able to find the previously written values.
--

NVSoft

http://www.nvsoft.com

DISCLAIMER: This e-mail and any attachment(s) is for authorized use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to the legal privilege of the sender of this email. If you have received this message in error, please notify the originator immediately and destroy the material in its entirety, whether electronic or hard copy. If you are not the intended recipient, you are notified that you are strictly prohibited from retaining, using, copying, alerting or disclosing the content of this message. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Net Vigil Software Private Limited. The recipient should check this email and any attachments for the presence of viruses. Net Vigil Software Private Limited accepts no liability for any damage caused by any virus transmitted by this email. Thank you for your co-operation.

Shai Almog

unread,
Sep 4, 2013, 1:29:22 AM9/4/13
to codenameone...@googlegroups.com, Shai Almog, nir...@nvsoft.com
How are you doing reinstalls?
Some devices prompt you whether to retain stored data. If its OTA install it should always work.

Nirmal Juthani

unread,
Sep 4, 2013, 1:49:04 AM9/4/13
to Shai Almog, codenameone...@googlegroups.com
I doing the reinstall using the barcode from the build-server and the device is asking, if you wish to replace the existing version with new version of the app. I am choosing "Yes" here.

Do you think, replacing the same version (since it is the same build, the version of the re-install will be the same as the existing app's version), causes it to remove the previous data?


On Wed, Sep 4, 2013 at 10:59 AM, Shai Almog <shai....@gmail.com> wrote:
How are you doing reinstalls?
Some devices prompt you whether to retain stored data. If its OTA install it should always work.



Shai Almog

unread,
Sep 4, 2013, 1:15:22 PM9/4/13
to codenameone...@googlegroups.com, Shai Almog, nir...@nvsoft.com
Shouldn't be a problem.
If you just do something such as Preferences.set("X", "Y") then in the next install do preferences.get("X", "Z") would you get Z or Y?
If you get "Z" then storage isn't working (in our code either). If you get Y then its a failure in your storage code that is throwing an exception on BB.

nir...@nvsoft.com

unread,
Sep 11, 2013, 12:55:04 AM9/11/13
to codenameone...@googlegroups.com, nir...@nvsoft.com
Hi Shai,

The problem is resolved. Actually it was an issue in my code. Due to some error in reading the data from sqllite db, the app was thinking the storage was not readable and was treating it as a fresh install.

Sorry for the confusion.

Regards,
Nirmal
Reply all
Reply to author
Forward
0 new messages