title: cursor.moveToFirst() always returns false
body: <p>I am using the following code to retrieve values from a db table.</p>
  
  <pre><code>public List&lt;String&gt; getProcedure() {
      List&lt;String&gt; labels = new ArrayList&lt;String&gt;();
  
      String selectQuery = "SELECT * FROM " + TABLENAME;
  
      SQLiteDatabase db = this.getReadableDatabase();
  
      Cursor cursor = db.rawQuery(selectQuery, null);
      Log.d("before", "if");
  
      if (cursor.moveToFirst()) {
          Log.d("inside", "if");
          while (cursor.moveToNext()) {
              Log.d("inside", "while");
              labels.add(cursor.getString(1));
          }
      }       
      cursor.close();
      db.close();     
      return labels;
  }
  </code></pre>
  
  <p>and I never get the log message "inside if" in the logcat. 
  What does this mean? </p>
  
  <p>I have data inside the table and am hence not able to retrieve it! How do I rectify it?? Please help!!</p>
  
  <p>My stack trace:</p>
  
  <pre><code>E/SensorManager(6951): thread start
  D/SensorManager(6951): registerListener :: handle = 4  name= MPL accel delay= 200000            Listener= android.view.OrientationEventListener$SensorEventListenerImpl@4207eb60
  D/before(6951): if
  D/SensorManager(6951): unregisterListener::  Listener=     android.view.OrientationEventListener$SensorEventListenerImpl@4207eb60
  D/Sensors(6951): Remain listener = Sending .. normal delay 200ms
  I/Sensors(6951): sendDelay --- 200000000
  D/SensorManager(6951): JNI - sendDelay
  I/SensorManager(6951): Set normal delay = true
  D/SensorManager(6951): registerListener :: handle = 4  name= MPL accel delay= 200000     Listener= android.view.OrientationEventListener$SensorEventListenerImpl@4207eb60
  I/Adreno200-EGLSUB(6951): &lt;ConfigWindowMatch:2087&gt;: Format RGBA_8888.
  E/SpannableStringBuilder(6951): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
  E/SpannableStringBuilder(6951): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
  </code></pre>