I need to make my app faster at first launch. For the moment I use a JSON file that I parse and I insert data in a db at first launch. The problem is this can take long long time (Samsung spica :/) because there is a big amount of data.
I was thinking about another way to do it. I would have 2 apps, one which generate the first sqlite db, which I copy into the resources of my main app. Therefore, I don’t need anymore to embed my JSON file but my db instead. I know this is possible and I know how to do it.
The question is: Can the DB be different depending on the device or android API version ? If I copy this db, every device will have the exact copy, so is this a problem, is there a risk for the db to not be compatible with X device / API version (I’m also talking about some constructors who like to make some changes) ?
Thank you for your time.
You may want to use some features that are introduced in “newer” version of SQLite.
For example foreign key support has been introduced in SQLite version 3.6.19 (API Level 8, Froyo) but triggers, afaik, are supported in all versions of Android.
So if in your database there are foreign key contraints they won’t work on android with API level <8.
I don’t think there are other differences.