Skip to content

Instantly share code, notes, and snippets.

@jeandersonbc
Created April 3, 2018 16:07
Show Gist options
  • Save jeandersonbc/f5036f1748a6890a15f8610383821018 to your computer and use it in GitHub Desktop.
Save jeandersonbc/f5036f1748a6890a15f8610383821018 to your computer and use it in GitHub Desktop.
if (cursor.moveToFirst()) {
while(!cursor.isAfterLast()){
String data = cursor.getString(cursor.getColumnIndex("data"));
// do what ever you want here
// ...
// Move to the next database entry
cursor.moveToNext();
}
}
// Never forget to close your cursor after using it.
cursor.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment