缩略图/图像缓存文件? [英] Thumbnail/image cache files?
问题描述
至于我写的应用程序提供更好的安全和隐私的一部分,我删除/删除我的Android设备上找到的图像和图片。
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.
因此,我想知道是否存在由操作系统创建的任何缓存/缩略图文件,例如,使被加工的全部实际的文件之前图库应用可以显示一个快速preVIEW。如果创建这样的文件,那么这将是我的兴趣向他们支付一定的关注。
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
推荐答案
是为在画廊的图片应该有缩略图文件也。如果一些图片没有缩略图文件,然后Android操作系统自动创建的文件。
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.
使用Media.URI您可以使用这些缩略图文件。
Using Media.URI you can use those thumbnails files.
编辑:这是样品code,
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 ) );
}
这篇关于缩略图/图像缓存文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!