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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Developer
Posts: 54
Registered: ‎11-12-2008
My Device: Bold 9800 or Storm 3 whichever hits Verizon first.
My Carrier: Verizon

How should I be storing data locally?

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.

XML

JSON

or is there some kind of local database that would be a better solution?

Thank you all for your support
black_berry
Developer
Posts: 80
Registered: ‎09-12-2009
My Device: Bold 9700
My Carrier: Vodafone UK

Re: How should I be storing data locally?

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)

Genius Development Scotland
Website: http://www.genius-dev.co.uk
New Developer
Posts: 54
Registered: ‎11-12-2008
My Device: Bold 9800 or Storm 3 whichever hits Verizon first.
My Carrier: Verizon

Re: How should I be storing data locally?

Greatly appreciate this information Smiley Wink

Thank you all for your support
black_berry
Regular Contributor
Posts: 51
Registered: ‎05-27-2010
My Device: 9700
My Carrier: developer

Re: How should I be storing data locally?

Hi black_berry

You can use RMS record store.

Highlighted
Developer
Posts: 950
Registered: ‎06-22-2010
My Device: 9550

Re: How should I be storing data locally?

Since OS 5.0, There are many storage available here.

 

Like RMS, SQLite. u can use easily.

Developer
Posts: 516
Registered: ‎07-23-2010
My Device: 9900

Re: How should I be storing data locally?

RMS is available before 5.0 OS and does not require signing.