I am trying to use MediaStore to get all images in phone/tablet. I am succesful with that.
String[] projection = new String[]{
MediaStore.Images.Media.DATA,
MediaStore.Images.Media.BUCKET_DISPLAY_NAME
};
Uri images = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
Cursor cur = activity.getContentResolver().query(images,
projection, // Which columns to return
"", // Which rows to return (all rows)
null, // Selection arguments (none)
"" // Ordering
);
if (cur.moveToFirst()) {
String photo;
String album;
int bucketColumn = cur.getColumnIndex(MediaStore.Images.Media.BUCKET_DISPLAY_NAME);
int photoColumn = cur.getColumnIndex(MediaStore.Images.Media.DATA);
album = cur.getString(bucketColumn);
photo = cur.getString(photoColumn);
}//Just parts of code
I want to create GridView with images I get from MediaStore.
Problems is when there is a lot of pictures it gets a little problematic. I use Universal Image Loader so its ok but I need it really really fast so I found that Android is supposed to have his own thumbnails of pictures stored in MediaStore.Images.Thumbnail so I will not have to create my own thumbnails.
Get thumbnail Uri/path of the image stored in sd card + android
Doesn't seem to work either. I looked in external database of device and there was nothing.