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

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

angularjs - ng-repeat duplicating items after page reload -