2

I'm developing my first app and using the following code I see what is my SQLite version:

Cursor cursor = SQLiteDatabase.openOrCreateDatabase(":memory:", null).rawQuery("select sqlite_version() AS sqlite_version", null);
String sqliteVersion = "";
while(cursor.moveToNext())
    sqliteVersion += cursor.getString(0);
Log.e("Version", sqliteVersion);

My version is 3.7.11.

Since I need to use some new features, how to upgrade it to the latest version?

smartmouse
  • 13,912
  • 34
  • 100
  • 166

1 Answers1

1

The SQLite library that you access with SQLiteDatabase is part of Android and cannot be replaced (unless you recompile Android on a rooted device).

You have to compile your own copy of SQLite with the NDK and access it through your own wrapper functions/objects.

Community
  • 1
  • 1
CL.
  • 173,858
  • 17
  • 217
  • 259
  • Even i do it on my phone, how to make my app compatible for all devices? So SQLite version is related to phone, i tought that i depends on Android SDK... – smartmouse Sep 28 '14 at 18:37
  • What you compile with the NDK gets shippe with your app. – CL. Sep 28 '14 at 19:06