Android-拍摄的图像保存在哪里?
我的应用程序中发生了一些奇怪的事情,我不确定是否值得上传所有代码...
Intent pictureIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
pictureIntent.putExtra( MediaStore.EXTRA_OUTPUT, imageUriToSaveCameraImageTo );
startActivityForResult(Intent.createChooser(pictureIntent, strAvatarPrompt), TAKE_AVATAR_CAMERA_REQUEST);
我使用此代码来拍照。照片被保存在 DCIM 文件夹中,并且还保存到指向 sdcard/文件夹的 imageUriSaveCameraImageto 中...图像的名称为 image1.jpg ..一旦运行即可工作。
然后我从 DCIM 和 sdcard/文件夹中删除文件,然后再次运行应用程序并拍摄不同的照片...由于某种原因,旧照片出现在文件夹中...它必须在其他地方缓存或存储它的副本。 ..有谁知道我在哪里以及如何删除它?谢谢
Something weird is happening in my application im not sure if it is worth uploading all the code...
Intent pictureIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
pictureIntent.putExtra( MediaStore.EXTRA_OUTPUT, imageUriToSaveCameraImageTo );
startActivityForResult(Intent.createChooser(pictureIntent, strAvatarPrompt), TAKE_AVATAR_CAMERA_REQUEST);
I use this code to take an photo. The photo gets saved in the DCIM folder and also into imageUriSaveCameraImageto which points to sdcard/folder...The image is given the name image1.jpg..once run it works.
Then i delete the files from DCIM and sdcard/folder and run the application again and take a different photo...for some reason the old photo appears in the folder...it must be caching or storing a copy of it else where...does anyone know where and how i can delete it?thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Android 确实将所有照片的缩略图缓存在另一个位置。
参见这里:
http://www.droidforums.net /forum/droid-general-discussions/30998-thumbnail-cache-can-cleared.html
Android indeed caches thumbnails of all the photos in another location.
See here:
http://www.droidforums.net/forum/droid-general-discussions/30998-thumbnail-cache-can-cleared.html
我无法给你一个确切的答案,但我的感觉是 MediaStore 是一个 ContentProvider,所以你可以调用 ContentResolver.delete(URI)。
I can't give you an exact answer, but my feeling is that the MediaStore is a ContentProvider, so you may be able to call ContentResolver.delete(URI).