If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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

Reply
New Developer
black_berry
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
Please use plain text.
Developer
geeneeus
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
Please use plain text.
New Developer
black_berry
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 :smileywink:

Thank you all for your support
black_berry
Please use plain text.
Regular Contributor
AndreyMM
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.

Please use plain text.
Developer
nitinverma274
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.

Please use plain text.
Developer
BB-Dude
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.

Please use plain text.