All Downloads are FREE. Search and download functionalities are using the official Maven repository.

android.database.sqlite.package.html Maven / Gradle / Ivy

Go to download

A library jar that provides APIs for Applications written for the Google Android Platform.

There is a newer version: 15-robolectric-12650502
Show newest version


Contains the SQLite database management
classes that an application would use to manage its own private database.

Applications use these classes to manage private databases. If creating a content provider, you will probably have to use these classes to create and manage your own database to store content. See Content Providers to learn the conventions for implementing a content provider. If you are working with data sent to you by a provider, you do not use these SQLite classes, but instead use the generic {@link android.database} classes.

The Android SDK and Android emulators both include the sqlite3 command-line database tool. On your development machine, run the tool from the platform-tools/ folder of your SDK. On the emulator, run the tool with adb shell, for example, adb -e shell sqlite3.

The version of SQLite depends on the version of Android. See the following table:

Android APISQLite Version
API 243.9
API 213.8
API 113.7
API 83.6
API 33.5
API 13.4

Some device manufacturers include different versions of SQLite on their devices. There are two ways to programmatically determine the version number.

  • If available, use the sqlite3 tool, for example: adb -e shell sqlite3 --version.
  • Create and query an in-memory database as shown in the following code sample:
        String query = "select sqlite_version() AS sqlite_version";
        SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(":memory:", null);
        Cursor cursor = db.rawQuery(query, null);
        String sqliteVersion = "";
        if (cursor.moveToNext()) {
            sqliteVersion = cursor.getString(0);
        }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy