Reputation: 1847
I'm confused about when to persist data in mobile development. AT this stage I'm initializing a table with some values that will not change. Is there an advantage to storing this data in a table as opposed to initializing a list containing the data every time I want to access it? It just seems like a lot of work storing data to a table and retrieving it and I don't want to do unnecssary work if there's no advantages.
Upvotes: 1
Views: 54
Reputation: 90
It doesn't sound like you have any changing data (CRUD) so I wouldn't use SQLite. Look into SharedPrefs as @Michael stated.
Upvotes: 1
Reputation: 2340
It's going to depends on the amount and complexity of your data.
If you have much data or the data you actually have can grow you should use SQLite
.
If you just have some configuration data like if you can notify the user or something like this or some string which is your case you should use SharePreference
.
Check this answer https://stackoverflow.com/a/9529787/6727154
Upvotes: 1