android - Ship an application with a database -


if application requires database , comes built in data, best way ship application? should i:

  1. precreate sqlite database , include in .apk?

  2. include sql commands application , have create database , insert data on first use?

the drawbacks see are:

  1. possible sqlite version mismatches might cause problems , don't know database should go , how access it.

  2. it may take long time create , populate database on device.

any suggestions? pointers documentation regarding issues appreciated.

i found way in reigndesign blog in article titled using own sqlite database in android applications. precreate database, put in assets directory in apk, , on first use copy "/data/data/your_package/databases/" directory.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -