Iterating through a Cursor is easier

while( cursor.moveToNext() ) { is all you need