views:

50

answers:

2

If I have a bunch of data that is never going to change (eg. an English language dictionary or the rgb values of a couple hundred color names), how do I use an SQLite database to store it? I know a database is faster than loading everything into memory when the app starts, but how do I make the database either the first time the app runs or "before" the apps ever runs?

A: 

Feed it a SQL file of CREATE and INSERTs during installation time and discard the initialization file.

msw
How can I do something during installation in Android?
sirconnorstack
A: 

Why not just put it in SharedPreferences files? (Check here) No need to have all the power (overhead) of a SQLite database if all you'll be doing with this data is loading once and simple look ups (no updates, inserts, queries, etc)

Ricardo Villamil