January 2014
Intermediate to advanced
736 pages
70h 43m
English
The private nested class DatabaseOpenHelper (Fig. 8.58) extends abstract class SQLiteOpenHelper, which helps apps create databases and manage version changes. The constructor (lines 105–109) simply calls the superclass constructor, which requires four arguments:
• the Context in which the database is being created or opened,
• the database name—this can be null if you wish to use an in-memory database,
• the CursorFactory to use—null indicates that you wish to use the default SQLite CursorFactory (typically for most apps) and
• the database version number (starting from 1).
102 private class DatabaseOpenHelper extends SQLiteOpenHelper103 { ...
Read now
Unlock full access