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
Posts: 84
Registered: ‎01-10-2013
My Device: Bold 9900
My Carrier: China Unicom

I need some suggestion of storing settings for app

I'm using persistent object to store a persistent class (not hashtable) for saving settings now, one app class used for load settings anothor for load/save settings, but now I have to load/save settings in two seprarte app classes, the results of load/save were out of my control, I can save settings in class one, but I cannot load settings stored by class one in second class.

 

I need some suggestion of storing settings with simply function, only for save/load/update, in a very very simple way, my settings values just looks like ("0", "1", "hello", ...), it's very simple too.

Developer
Posts: 16,791
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: I need some suggestion of storing settings for app

if you use a generic object to store the settings you can read the persistent object from multiple applications.

there is no simple settings api on bb java, you can look into sqlite or use a file maybe.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 84
Registered: ‎01-10-2013
My Device: Bold 9900
My Carrier: China Unicom

Re: I need some suggestion of storing settings for app

thanks for your reply, simon

 

the sqlite and file were based on built-in storage and sd card, I don't think this is a reliable plan for saving settings while the device connected to pc and choose storage mode.

 

I'm not need to share settings between two apps, in my question I only want to share settings between two seprarte classes in one app

 

maybe I have to using hashtable to solve my problemSmiley Sad

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: I need some suggestion of storing settings for app

This tutorial might help:

http://supportforums.blackberry.com/t5/Java-Development/Storing-Persistent-Data/ta-p/442785

 

Type "Persistent" in the search box for other interesting links. 

Highlighted
Developer
Posts: 84
Registered: ‎01-10-2013
My Device: Bold 9900
My Carrier: China Unicom

Re: I need some suggestion of storing settings for app

thanks peter, I have been studiedI interesting links whole night and I will read pdf next morning, good night