title: getContext() cannot be resolved in SQLite dB
body: <p>I'm trying to create an SQL database to store local contact information (mainly just phone# (to be verify at a later time) and display name, along with a user-specified boolean. I created a new contactdb class, but I ran into some bumps when trying to use getcontext(). Secondary values for put are also not able to be resolved. Does anyone have any hints in how to go about solving this? Do I need to create a new class file for Dbhelper? Or is that bit meant to be instantialized within the mainactivity class, wherein I wish to read / write information to the DB?  </p>
  
  <pre><code>package treehouse.greenlight;
  import android.content.Context;
  import android.database.sqlite.SQLiteDatabase;
  import android.provider.BaseColumns;
  import android.database.sqlite.SQLiteOpenHelper;
  import android.database.sqlite.*;
  import android.os.Bundle;
  import android.content.ContentValues;
  import android.view.View;
  
  public final class contactdb {
  // To prevent someone from accidentally instantiating the contract class,
  // give it an empty constructor.
  public contactdb() {
  }
  
  /* Inner class that defines the table contents */
  public static abstract class dbEntry implements BaseColumns {
      public static final String TABLE_NAME = "Contacts";
      public static final String COLUMN_NAME_ENTRY_ID = "entryid";
      public static final Boolean COLUMN_NAME_STATUS = false;
      public static final String COLUMN_NAME_PHONE = "0000000000";
      public static final String COLUMN_NAME_NAME = "N/A";
      private static final String TEXT_TYPE = " TEXT";
      private static final String COMMA_SEP = ",";
      private static final String SQL_CREATE_ENTRIES =
              "CREATE TABLE " + dbEntry.TABLE_NAME + " (" +
                      dbEntry._ID + " INTEGER PRIMARY KEY," +
                      dbEntry.COLUMN_NAME_STATUS + TEXT_TYPE + COMMA_SEP +
                      dbEntry.COLUMN_NAME_NAME + TEXT_TYPE + COMMA_SEP +
                      dbEntry.COLUMN_NAME_PHONE + TEXT_TYPE + COMMA_SEP +// Any other options for the CREATE command
                      " )";
  
      private static final String SQL_DELETE_ENTRIES =
              "DROP TABLE IF EXISTS " + dbEntry.TABLE_NAME;
  
  
      public class DbHelper extends SQLiteOpenHelper {
          DbHelper mDbHelper = new DbHelper(getContext());
          // If you change the database schema, you must increment the database version.
          public static final int DATABASE_VERSION = 1;
          public static final String DATABASE_NAME = "FeedReader.db";
  
          public DbHelper(Context context) {
              super(context, DATABASE_NAME, null, DATABASE_VERSION);
          }
          public void onCreate(SQLiteDatabase db) {
              db.execSQL(SQL_CREATE_ENTRIES);
  
  
              // Gets the data repository in write mode
              db = mDbHelper.getWritableDatabase();
  
              // Create a new map of values, where column names are the keys
              ContentValues values = new ContentValues();
              values.put(dbEntry.COLUMN_NAME_ENTRY_ID, id);
              values.put(dbEntry.COLUMN_NAME_STATUS, status);
              values.put(dbEntry.COLUMN_NAME_PHONE, content);
  
              // Insert the new row, returning the primary key value of the new row
              long newRowId;
              newRowId = db.insert(
                      dbEntry.TABLE_NAME,
                      dbEntry.COLUMN_NAME_NULLABLE,
                      values);
          }
  
          public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
              // This database is only a cache for online data, so its upgrade policy is
              // to simply to discard the data and start over
              db.execSQL(SQL_DELETE_ENTRIES);
              onCreate(db);
          }
  
          public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
              onUpgrade(db, oldVersion, newVersion);
          }
      }
  
  
  }
  }
  </code></pre>