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

Web and WebWorks Development

Trusted Contributor
Posts: 100
Registered: ‎01-13-2012
My Device: Simulator - 9800
My Carrier: Simulator
Accepted Solution

Persistent Storage for Simple String

I am looking for a way to persistanty store a series of strings. For example, assume I have a list of names


- Anna

- Bob

- Cathy

- David

- Erin

- Fred

- George


if I click on one of their names, I want to store them in a "favourites" section. So if I click on Anna, Bob and Fred I would like to persistently store them. Having turned the phone on and off, I would hope to see on the favourites section:


- Anna

- Bob

- Fred


Does anyone know how to achieve this? Thanks for any information.

Posts: 214
Registered: ‎01-07-2011
My Device: Bold 9900
My Carrier: Rogers

Re: Persistent Storage for Simple String

I usually use localStorage to store stuff like that. https://bdsc.webapps.blackberry.com/html5/apis/localStorage.html


It does work on smartphones even though they aren't listed, I have it in apps on OS 6 and 7. I haven't tried OS5 but I believe it is there as well.

Rory (@roryboy)
Click "Accept as Solution" if post solved your original issue. Give like/thumbs up if you feel post is helpful