Storage class persistance

8 views
Skip to first unread message

Dennis Rogers

unread,
Mar 3, 2021, 12:48:23 PM3/3/21
to CodenameOne Discussions
I'm using the storage class to save information permanently but I notice, using the simulator and a real device, that every time I compile a new version of the app it erases the persistent storage. I assume that loading a new version of the app from the app store will not erase this persistent storage. Is that true? Also is there a way to update the app in the simulator that will leave the persistent storage intact? 
Thanks, Dennis

Shai Almog

unread,
Mar 3, 2021, 9:07:45 PM3/3/21
to CodenameOne Discussions
This isn't erased. I'm guessing you have an exception or rely on things such as getClass().getName() which would be flaky. You can see that storage is written into your .cn1 directory and should be accessible from there in the simulator.
Reply all
Reply to author
Forward
0 new messages