Saving a List for future use

Put your problem here if it does not fit any of the other categories.

Saving a List for future use

Postby sevenrechlin » Fri May 28, 2010 11:32 am

Hello,

I am attempting to save a List (or Array, if I had to) for future use, basically as a favorites list. I am using a List as I need to keep track of a group of integers, and need to be able to easily add/remove them. Unfortunately, PreferenceSaver does not allow you to save Lists or Arrays.

Any ideas (or code examples) on how to easily accomplish this? I have been Googling forever and can't find anything that works. Thanks!
sevenrechlin
Freshman
Freshman
 
Posts: 3
Joined: Sat May 22, 2010 1:14 am

Top

Re: Saving a List for future use

Postby anarche » Fri May 28, 2010 12:30 pm

serialise the list and write it to a file
http://developer.android.com/reference/ ... zable.html

or use the database
anarche
Master Developer
Master Developer
 
Posts: 369
Joined: Sun Apr 11, 2010 5:21 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: TurnitinBot [Bot] and 22 guests