Search code examples
blackberrypersistencedatastore

strategy for persisting data in blackberry app


I've been looking through the Blackberry documentation and they outline 3 different mechanisms for persisting application data:

  1. Persistent Store API
  2. MIDP RMS API
  3. File System API

I'm wondering about the following things...

  1. What are the pros/cons of each approach
  2. Is there a maximum size of data that can be stored? I'm not so concerned about individual object size as much as total size. For example, there used to be a 64K limit for the persistent store but that has been expanded to several MB in the latest versions of the software. However, I couldn't find any details on maximum sizes that can be stored.
  3. Is one of the approaches considered the "best way" to persist data?
  4. Any other persistence mechanisms (such as SQL-Lite) that anyone would suggest?

Solution

  • We use the persistent store API because it is truly persistent, even across device reboots. In fact it's almost TOO persistent as your persisted data is not deleted from the device when the app is deleted (unless you persist custom objects, I think). The storage space is limited only to the available flash memory - there are no per-application quotas.

    EDIT: removed inaccurate comment about RMS