title: Android - SQLite AUTOINCREMENT not incrementing primary key
body: <p>I've searched around stack overflow and couldn't find a solution for this. 
  This is my onCreate code for SQLite.</p>
  
  <pre><code>public void onCreate(SQLiteDatabase database) {
      String query = "CREATE TABLE cards (cardID INTEGER PRIMARY KEY AUTOINCREMENT, question VARCHAR, answer VARCHAR, subject VARCHAR)";
      database.execSQL(query);
  }
  </code></pre>
  
  <p>I use this to insert from the adapter (DbTools)</p>
  
  <pre><code>public void insertCard(HashMap&lt;String, String&gt; queryValues) {
  
      SQLiteDatabase database = this.getWritableDatabase();
      ContentValues values = new ContentValues();
      values.put("question", queryValues.get("question"));
      values.put("answer", queryValues.get("answer"));
      values.put("subject", queryValues.get("subject"));
  
      database.insert("cards", null, values);
      database.close();
  
  }
  </code></pre>
  
  <p>This is the way I am inserting data into the database.</p>
  
  <pre><code>HashMap&lt;String, String&gt; Values = new HashMap&lt;String, String&gt;(); 
  Values.put("question", newQuestion);
  Values.put("answer", newAnswer);
  Values.put("subject", newSubject);
  dbTools.insertCard(Values);
  </code></pre>
  
  <p>Where newQuestion, newAnswer and newSubject are variables that define the user input from an edittext field.</p>
  
  <p>When I check the database by calling a toast, everything is inserted except the cardID which is inserted as Null. 
  Doubting my toast check, I downloaded a database viewer and also found that the cardID was null. </p>
  
  <p>Any suggestions?  </p>