{infiniteZest}
// Articles. Tutorials. Utilities.
Home  |   Search  |   Login  
Categories Skip Navigation Links
New / All
AJAX
Apple
ASP.NET
.NET
Git
Google / Android
Python / IronPython
Miscellaneous
SQL Server
Understanding SQLite packages in Android
Summary
This article talks about the SQLite packages available in Android SDK.
 
Table of Contents

The Packages

Package for the Android applications

Code Listing 1. SQLite classes from Android SDK

Figure 1. SQLite classes for developing db features in an Android application

Package for running SQLite

Code Listing 2. Classes for running SQLite

Figure 2. SQLite classes from Package Explorer

Figure 3. The main() method in the Shell class

 

The Packages

The SQLite packages are contained in the Android Library. The physical file Android Library is android.jar. The .jar (Java Archive) files contain a set of Java classes and others like resources (This is in a way similar to embedding images and other resource files into dll files).

The following discusses the two sets of SQLite related packages included in the android.jar file.

Package for the Android applications

Some classes are available for the Android applications to develop the database functionality. These are SQLite classes from the Android SDK, shown in the following listing.

Code Listing 1. SQLite classes from Android SDK

android/database/


android/database/sqlite/
android/database/sqlite/SQLiteDatabase$SyncUpdateInfo.class
android/database/sqlite/SQLiteDatabase$CursorFactory.class
android/database/sqlite/SQLiteDatabase.class
android/database/sqlite/SQLiteClosable.class
android/database/sqlite/SQLiteStatement.class
android/database/sqlite/SQLiteProgram.class
android/database/sqlite/SQLiteCursorDriver.class
android/database/sqlite/SQLiteQuery.class
android/database/sqlite/SQLiteCursor.class
android/database/sqlite/SQLiteDatabaseCorruptException.class
android/database/sqlite/SQLiteException.class
android/database/sqlite/SQLiteDebug$PagerStats.class
android/database/sqlite/SQLiteDebug.class
android/database/sqlite/SQLiteDirectCursorDriver.class
android/database/sqlite/SQLiteDiskIOException.class
android/database/sqlite/SQLiteOpenHelper.class
android/database/sqlite/SQLiteQueryBuilder.class
android/database/sqlite/SQLiteTempTableCursorDriver.class


android/database/Cursor.class
android/database/SQLException.class
android/database/ContentObserver$NotificationRunnable.class
android/database/ContentObserver$Transport.class
android/database/ContentObserver$1.class
android/database/ContentObserver.class
android/database/DataSetObserver.class
android/database/IContentObserver$Stub$Proxy.class
android/database/IContentObserver$Stub.class
android/database/IContentObserver.class
android/database/CursorWindow$1.class
android/database/CursorWindow.class
android/database/IBulkCursor.class
android/database/DataSetObservable.class
android/database/Observable.class
android/database/AbstractWindowedCursor.class
android/database/AbstractCursor$SelfContentObserver.class
android/database/AbstractCursor.class
android/database/ContentObservable.class
android/database/ArrayCursor.class
android/database/ArrayListCursor.class
android/database/BulkCursorNative.class
android/database/BulkCursorProxy.class
android/database/BulkCursorToCursorAdaptor.class
android/database/CursorIndexOutOfBoundsException.class
android/database/CursorToBulkCursorAdaptor$ContentObserverProxy.class
android/database/CursorToBulkCursorAdaptor.class
android/database/DatabaseUtils.class
android/database/MergeCursor.class
android/database/StaleDataException.class

The classes for developing db functionality from the Android applications can be split into two groups. The classes for general database related functionality; and the classes that are specific to SQLite. The general db classes are in android/database and the SQLite classes are in android/database/sqlite.

The above listing is obtained by extracting the table of contents from android.jar. The same classes can be seen from the Package Explorer of an Android application opened in Eclipse.

Figure 1. SQLite classes for developing db features in an Android application

Figure 1. SQLite classes for developing db features in an Android application

Package for running SQLite

Some classes are included in the android.jar that help run the SQLite from shell, etc. These classes are shown in the following listing.

Code Listing 2. Classes for running SQLite

SQLite/
SQLite/Authorizer.class
SQLite/BlobR.class
SQLite/Blob.class
SQLite/BlobW.class
SQLite/BusyHandler.class
SQLite/Callback.class
SQLite/Constants.class
SQLite/Database.class
SQLite/Exception.class
SQLite/TableResult.class
SQLite/Function.class
SQLite/Trace.class
SQLite/Vm.class
SQLite/Stmt.class
SQLite/ProgressHandler.class
SQLite/FunctionContext.class
SQLite/JDBC2y/
SQLite/JDBC2y/JDBCConnection.class
SQLite/JDBC2y/DatabaseX.class
SQLite/JDBC2y/JDBCDatabaseMetaData.class
SQLite/JDBC2y/JDBCResultSet.class
SQLite/JDBC2y/TableResultX.class
SQLite/JDBC2y/JDBCStatement.class
SQLite/JDBC2y/JDBCResultSetMetaData.class
SQLite/JDBC2y/BatchArg.class
SQLite/JDBC2y/JDBCPreparedStatement.class
SQLite/JDBCDriver.class
SQLite/Shell.class
SQLite/DBDump.class
SQLite/StringEncoder.class

And the following figure shows the above listing from the Package Explorer:

Figure 2. SQLite classes from Package Explorer

Figure 2. SQLite classes from Package Explorer

You can see that the Shell.class has main() method in it:

Figure 3. The main() method in the Shell class

Figure 3. The main() method in the Shell class
Bookmark and Share This

More Articles With Similar Tags
icon-android-debug-toolbar.jpg
This article gives some quick pointers on how to start debugging an Android application, along with where to put the breakpoints and how to change the emulator sizes from within Eclipse.
icon-android-safari-browser-user-agent-string.jpg
This article talks about the basics of the browser (including the user agent string) used in the Android platform.
This article talks about various aspects of creating an SQLite database. It also uses Android SQLite shell as an example.
This article explains how to get pretty / nice output from the SQLite command line shell program.
icon-android-emulator-hvga-p-lunar-lander.jpg
See the images of various skins and screens of Android emulator with games (Lunar Lander and Snake) in them. Also shows how to change the skins of Android emulator while debugging your program.
About  Contact  Privacy Policy  Site Map