Creating a subclass of SQLiteOpenHelper (30 minutes)

Using what we've learned as guidance, create your own subclass of SQLiteOpenHelper that does the following:

  • Creates a database, called "store"
  • Creates a table called "televisions", with the columns:
    • id
    • brand
    • size (i.e. 40")
    • price (integer)
  • In the main activity of your app, insert at least 5 televisions into the database

In a commented line above each SQL method of the SQLiteOpenHelper, write the equivalent raw SQL String you could use as an alternative.

Be sure to leverage documentation!

results matching ""

    No results matching ""