I'm writing an app which uses the Foreign Key Constraints which support was开发者_JS百科 only just brought in for on version 2.2, and my phone is 2.1 Is there any way to upgrade the version of sqlite3 on the htc desire or any other android phone when your application installs?
short answer, no.
Longer answer. Yes, but you would have to have root because the sqlite binary is in /system/xbin. you would need root access to be able to overwrite that file. you would not be able to upgrade any other device unless they too had root, and a recovery image that supported update.zips that can be signed using the "test keys". then you would have to manually distribute the update zip file, that the user would have to reboot in to recovery mode, flash the update.zip to apply your "patch".
As Ryan pointed out, you can change the binary if you have root access, but there is also another possibility: you can add the compiled SQLite native files to your app and access them via JNI. Here is an example project using SQLite with the Spatialite extension: https://github.com/mrenouf/android-spatialite
精彩评论