-2

我正在开发一个电视/广播应用程序。我希望能够将最喜欢的电台保存在应用程序的某个地方,然后将它们加载到收藏夹菜单下的列表视图中。

存储此类数据的最佳选择是什么?对于每个站,我想存储其名称、URL 和描述。

我正在考虑使用共享首选项并将数据保存在 json 编码数组中。你认为这是一个好的选择吗?

4

1 回答 1

1

I believe this is not a good option. Even though it seems like favorite radio stations are preferences, they probably aren't. What if I have 10 favorite radio stations. How will you manage that with SharedPreferences? I would strongly suggest you use SQLite with a table of favorites or another android way to persist data: http://developer.android.com/guide/topics/data/data-storage.html

于 2013-08-05T18:51:32.787 回答