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.
i dont think it will make any major difference if u r using sqlite 3.0 which is the minimum version used in all devices. But if u r using features of SQLite version 3.6.19 like foreign key etc they will not work in devices running version 3.0 .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With