If you need to manage data in a private database, use the android.database.sqlite
classes. These classes are used to manage the Cursor
object returned from a content provider query. Databases are usually created and opened with openOrCreateDatabase(String, int, SQLiteDatabase.CursorFactory)
To make requests through content providers, you can use the content.ContentResolver
class.
All databases are stored on the device in /data/data/
Class Overview
A helper class to manage database creation and version management.
You create a subclass implementing onCreate(SQLiteDatabase)
, onUpgrade(SQLiteDatabase, int, int)
and optionally onOpen(SQLiteDatabase)
, and this class takes care of opening the database if it exists, creating it if it does not, and upgrading it as necessary.
No comments:
Post a Comment