[data-structure]store a friend list, use file or preference?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

[data-structure]store a friend list, use file or preference?

Postby Mursuli » Sat Jan 16, 2010 11:30 am

Hi all, I am new to android.
I would like to find some suggestions for implementing a friend contact-like list in my application.

I am to display a list of friends and their contact numbers when the user clicks a "View friend list" button.
The list can be managed (add/modify/remove people) by the application user and should be kept when the application or the mobile are turned off. When the application are started again, the list should be shown again.

The list will be offline and without database/network connection to get the friends' data.

Should I use a file or preference (Sharedpreference or others) or others to store a list of friends and their contact numbers in the mobile? I don't need other applications to access the list.

P.S. The list will be independent from the original phone book in a android mobile.

Thank you very much!!
Mursuli
Junior Developer
Junior Developer
 
Posts: 10
Joined: Sat Jan 09, 2010 4:05 pm

Top

Re: [data-structure]store a friend list, use file or prefere

Postby bingxuewangzi427 » Thu Feb 04, 2010 4:48 am

Mursuli wrote:Hi all, I am new to android.
I would like to find some suggestions for implementing a friend contact-like list in my application.

I am to display a list of friends and their contact numbers when the user clicks a "View friend list" button.
The list can be managed (add/modify/remove people) by the application user and should be kept when the application or the mobile are turned off. When the application are started again, the list should be shown again.

The list will be offline and without database/network connection to get the friends' data.

Should I use a file or preference (Sharedpreference or others) or others to store a list of friends and their contact numbers in the mobile? I don't need other applications to access the list.

P.S. The list will be independent from the original phone book in a android mobile.

Thank you very much!!


you can use a database (Content Provider in android) to store all you want,and by a listactivity to show ..
bingxuewangzi427
Developer
Developer
 
Posts: 38
Joined: Tue Jan 26, 2010 11:33 am

Postby Mursuli » Thu Feb 04, 2010 12:29 pm

hi, thank you for your reply.
However, as there was no replies for a long time,
i used serialization for storing the list as an object.
Please comment on this if you guys are interested. :)
Mursuli
Junior Developer
Junior Developer
 
Posts: 10
Joined: Sat Jan 09, 2010 4:05 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 13 guests