How can I get every row from a Content Provider?
How can I get every row from a content provider ? I tried to do this using Cursor c = getContentResolver().query(uri, null, null, null, null)
and then
String s;
if (c != null && c.moveToFirst())
while (c.moveToNext())
s = c.getString(c.getColumnIndexOrThrow("string"));
c.close();
but it didn't work.Instead of taking all the rows, it was taking only the last one, repeatedly, as many times as the rows-1 of my db.