How to retrieve data from cursor class

Once you have the Cursor object, you can do something like this:

if (cursor.moveToFirst()){
   do{
      String data = cursor.getString(cursor.getColumnIndex("data"));
      // do what ever you want here
   }while(cursor.moveToNext());
}
cursor.close();

Leave a Comment