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
Developer
TeeC
Posts: 18
Registered: ‎01-27-2010
My Device: Curve 8330

Questions About Persistent Store and Configuration Settings

This is a simple question, is using the Blackberry persistent Store functionality the best way to store and set configuration settings for the application? I don't think a configuration file stored on the SD card is safe enough.

 

What are your thoughts?

 

Developer
ydaraishy
Posts: 562
Registered: ‎09-30-2009
My Device: Not Specified

Re: Questions About Persistent Store and Configuration Settings

What do you mean, "safe enough"? If you put proper validation code in, SD card is also a perfectly reasonable option for configuration values.

Developer
Developer
gtj
Posts: 319
Registered: ‎07-20-2008
My Device: Not Specified

Re: Questions About Persistent Store and Configuration Settings

The downside of storing config data on the SDCard is that the user can switch or remove the card at any time taking your config data with it.  The SDCard is also subject to Mass Storage Mode which means the card becomes unavailable when the device is plugged into a PC.   Of course, using the card might make it easier for a user to move the config to a new device or to upgrade OS on the device.  I guess it depends on your needs.  Personally, I use the persistent store for all config data because it's easy to work with and always available.

 

 

 

 

Developer
TeeC
Posts: 18
Registered: ‎01-27-2010
My Device: Curve 8330

Re: Questions About Persistent Store and Configuration Settings

Very good point. what about storing not only config settings in the persistent store but also saved information? I'm thinking about allowing the user to cache searching critieria but I'm having a hard time deciding if I should place it in the persistent store or as an encrypted xml file.

 

However, you make a good point about the SD card being changed out and mass storage functionality.

Developer
Developer
CMY
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook

Re: Questions About Persistent Store and Configuration Settings

For the newer devices that have onboard storage, you can use that. Also, with this, if you store the data under the settings folder, it is transferred with a new device upgrade if you use the desktop manager.