How can I get every row from a Content Provider?
18:00 01 Feb 2016

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.

android android-contentprovider