doing a query with MediaStore.Images.Media does not show all images whether it is querying internal content or external content
The results (the thumbnails and the location those thumbnails are retrieved from) are not the same across even mainstream devices. Devices with no SD card and only internal storage have different image results, Samsung devices have different kinds of results, Google devices have different kinds of results.
Specifically with this code that is used around stackoverflow as a solution,
final String[] columns = {MediaStore.Images.Thumbnails._ID};
final String orderBy = MediaStore.Images.Media._ID;
Cursor imagecursor = context.getContentResolver().query(
MediaStore.Images.Media.EXTERNAL_CONTENT_URI, columns,
null, null, orderBy);
if (imagecursor != null) {
int image_column_index = imagecursor
.getColumnIndex(MediaStore.Images.Media._ID);
int count = imagecursor.getCount();
for (int i = 0; i < count; i++) {
imagecursor.moveToPosition(i);
int id = imagecursor.getInt(image_column_index);
ImageItem imageItem = new ImageItem();
imageItem.id = id;
lastId = id;
imageItem.img = MediaStore.Images.Thumbnails.getThumbnail(
context.getApplicationContext().getContentResolver(), id,
MediaStore.Images.Thumbnails.MINI_KIND, null);
images.add(imageItem);
}
imagecursor.close();
I look at the code and it seems sound, but I need a better solution because results vary, and on some devices I have no idea where the resulting thumbnails have been pulled from