Reputation: 399
As part of providing better security and privacy for the application I'm writing, I am removing/deleting images and pictures found on my Android device.
I am therefore curious to know if there are any cache/thumbnail files created by the OS, for example so that the Gallery app can display a quick preview before the full actual file is processed. If such files are created, then it would be in my interest to pay them some attention
Upvotes: 3
Views: 4792
Reputation: 109257
yes for the images on the gallery there should be thumbnails files also. If some images have not the thumbnails files then Android OS automatically created those files.
Using Media.URI you can use those thumbnails files.
EDIT: this is the sample code,
Cursor cursor = MediaStore.Images.Thumbnails.queryMiniThumbnail(
getContentResolver(), selectedImageUri,
MediaStore.Images.Thumbnails.MINI_KIND,
null );
if( cursor != null && cursor.getCount() > 0 ) {
cursor.moveToFirst().
String uri = cursor.getString( cursor.getColumnIndex( MediaStore.Images.Thumbnails.DATA ) );
}
Upvotes: 3