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
Trusted Contributor
Posts: 224
Registered: ‎08-11-2010
My Device: Not Specified
Accepted Solution

what is the standard way to backup / restore application options ?

Hello,

I was wondering what is the standard way to backup / restore application options (scenario: user backups options on memory card, reinstalls OS, reinstalls app, restores options)

I'd rather not implement my own encode / decode routines if possible.

I have seen several approaches used in real-world apps:
* csv like data file
* binary storage (Berry Weather)
but I am not aware about how they were implemented.

Any ideas / suggestions ?
Highlighted
Trusted Contributor
Posts: 224
Registered: ‎08-11-2010
My Device: Not Specified

Re: what is the standard way to backup / restore application options ?

Any experts around ? 

 

I am looking for something similar to Java SE serialization ... 

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

Re: what is the standard way to backup / restore application options ?

Here is the 'official' way:

 

http://supportforums.blackberry.com/t5/Java-Development/Backup-and-restore-small-amounts-of-data-usi...

 

This works if people use Desktop Manager to switch devices. 

 

I think most people will write their own serialization code to convert from the Objects to a byte form (as you have seen csv, or own format, or XML) and then put that somewhere - like your own server for a network aware app or SD Card.  This approach works regardless of the method the user users to switch devices. 

Trusted Contributor
Posts: 224
Registered: ‎08-11-2010
My Device: Not Specified

Re: what is the standard way to backup / restore application options ?


Peter, thanks for your response.

I am aware of the Desktop Manager approach, but was looking for something more general.

> I think most people will write their own serialization code to convert from the Objects to a byte form

It seems that I will also have to go this way ...

I will leave this thread open for another couple of days in case that anybody else has something to say.
Trusted Contributor
Posts: 224
Registered: ‎08-11-2010
My Device: Not Specified

Re: what is the standard way to backup / restore application options ?

Since there are no other contributors, I am accepting peter's comment as "answer".