08-22-2010 04:49 PM
I have only ever made an app once and that was 2 years ago. On the project we had used XML. But that was only because we did not know what we were doing where I was working.
So fast forward to today, I would like to know how best to store data locally for retrieval.
or is there some kind of local database that would be a better solution?
08-22-2010 05:06 PM
Prior to OS 5.0 you could either store it as plain-text on the device internal or external memory or else you can store data as Java Objects in the PersistentStore (look up documentation and samples)
OS 5.0 or later also has SQLite at hand. (OS 5.0 SQLite DB Limit = 512kb, OS 6.0 SQLite DB Limit = 5MB)
I would recommend SQLite if working with OS 5.0 or higher and the PersistentStore for pre OS 5.0
WARNING: If you are using the Persistent Store on any OS version then a software upgrade or device wipe will result in total loss of data in the Persistent Store. You'd best use a form of backup to device internal or external memory but for easier overall experience the PersistentStore is better. (in my opinion)