title: Android SQLite get data from database to an array
body: <p>i want to get the value from the cursor without the SimpleCursorAdapter part.here is the code</p>
  
  <pre><code>public Cursor queueAll(){
    String[] columns = new String[]{KEY_ID, KEY_CONTENT1, KEY_CONTENT2,KEY_CONTENT3};
    Cursor cursor = sqLiteDatabase.query(MYDATABASE_TABLE, columns,
      null, null, null, null, null);
    return cursor;
   }
  </code></pre>
  
  <p>and the activity side code</p>
  
  <pre><code>cursor = mySQLiteAdapter.queueAll();
  
         from = new String[]{SQLiteAdapter.KEY_ID, SQLiteAdapter.KEY_CONTENT1, SQLiteAdapter.KEY_CONTENT2, SQLiteAdapter.KEY_CONTENT3};
         int[] to = new int[]{R.id.id, R.id.text1, R.id.text2,R.id.text3};
         cursorAdapter =
         new SimpleCursorAdapter(this, R.layout.row, cursor, from, to);
         listContent.setAdapter(cursorAdapter); 
  
         while(!cursor.isAfterLast())
         {
             String tilt = cursor.getString(cursor.getColumnIndex(SQLiteAdapter.KEY_CONTENT1));
             String pkg = cursor.getString(cursor.getColumnIndex(SQLiteAdapter.KEY_CONTENT3));
             if(tilt.equals("LEFT"))
             {
             Log.v("LEFT",pkg);
             }
             else if(tilt.equals("RIGHT"))
             {
                 Log.v("RIGHT",pkg);
             }
             cursor.moveToNext();
         }
  </code></pre>
  
  <p>i am getting the pkg value correct.but i want to get the values directly from the cursor while removing SimpleCursorAdapter part the code doesn't work.
  any help would be appreciated :)</p>