Changes

Jump to: navigation, search

An Android SQLite Database Tutorial

3 bytes removed, 15:08, 7 July 2014
Implementing the Data Handler
== Implementing the Data Handler ==
The data handler will be implemented by subclassing from the Android SQLiteOpenHelper class and, as outlined in An Overview of Android SQLite Databases, adding the constructor, onCreate() and onUpgrade() methods. Since the handler will be required to add, query and delete data on behalf of the activity component, corresponding methods will also be need to be added to the class.
Begin by adding a second new class to the project. This time the class will be named MyDBHandler and subclassed from android.database.sqlite.SQLiteOpenHelper. Once the new class has been created, load it into an editing panel where it will read as follows:

Navigation menu