Getting Strings from A Cursor in Android?
Use this:
if (cursor.moveToFirst()) { str = cursor.getString(cursor.getColumnIndex("content"));}
First you'll want to move the Cursor you got from your Query to the first row using the moveToFirst()
-method.
After that you can get your fields values by using the getString()
or getInt()
-methods.