tags:

views:

42

answers:

2

Hi,

I am developing an Android application where you should be able to browse restaurants.

Im retrieving the information about the restaurants from a service, they are not stored locally on the device. But I want to allow the user to add a restaurant to his/her favorites.

What is the "best" way to store that kind of info on the device? Should I use Shared Preferences or Sqlite db? Or any other suggestions?

A: 

If you know SQL go with SQLite database if you don't maybe go with SharedPreferences.

Pentium10
A: 

SqLite is probably the best way to go. It will allow you to structure the information in useful ways, whereas SharedPreferences is more of a Key-Value affair. That might be fine if you only need to store a set of strings, but it will be a pain if you ever decide you need to store additional information with a favorite, such as ordering, type, or date.

If you use SqLite, you can easily add columns.

BenTobin
Thanks! I will go for SqlLite then
Zeno
Glad I could help. Can you mark your question as answered? It helps keep StackOverflow clean.
BenTobin