Skip to content Skip to sidebar Skip to footer

Android ContentResolver.query Always Returns Same Data

I have videoplayer app with filebrowser listing all videos on SD card Code inspired by i want get audio files in sd card Using ContentResolver, works as expected, but it does not u

Solution 1:

You should first call cursor.moveToFirst() .

So, your cursor iteration loop should look like

if (cursor.moveToFirst()) {
    do {
        // cursorIndex = cursor.getColumnIndexOrThrow, etc...
    } while (cursor.moveToNext());
}

Post a Comment for "Android ContentResolver.query Always Returns Same Data"