使相机保持从节约照片 [英] Keep Camera from saving photo

查看:142
本文介绍了使相机保持从节约照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有派遣意图捕捉照片的应用程序。在控制权返回到活动中,我检索意图,提取数据,将其转换成位图,在我的应用程序中使用它。只是一些简单的code。

I have an application that captures pictures by dispatching an intent. Upon return of control to the activity, I retrieve the intent, extract the data, transform it into a bitmap and use it in my application. Just some straight forward code.

拍摄的照片都受到一些隐私的义务,我的应用程序负责删除所有数据。问题是,通过相机应用程序拍摄的所有照片似乎被自动保存到内部存储。我删除了设备拍摄的截图和清除所有缩略图成功。剩下的工作就是从第一名存储图像保持相机的应用程序。

The pictures taken are subject to some privacy obligations and my application takes care to delete all data. The problem is that all pictures taken by the Camera application seem to automatically be saves into internal storage. I was successful in deleting screenshots taken by the device and by clearing all thumbnails. What remains to be done is keep the Camera application from storing picture in the first place.

我看到它的问题是,我放弃控制应用程序,因此,以任何方式无法影响它。我试着推出 ACTION_IM​​AGE_CAPTURE_SECURE ,但失败。我更preFER从图像存储到具有扫描内部存储位置的图像和删除它们。我尝试过了,失败的方式保持应用程序的方法。

The problem as I see it is that I relinquish control to the application and, hence, cannot influence it in any way. I tried launching ACTION_IMAGE_CAPTURE_SECURE but that failed. I would much prefer the approach of keeping the application from storing the image to the approach of having to scan the internal storage location for images and delete them as I tried it and failed.

请注意:我已经分配了所有正确的权限。如果您需要code,我会很乐意将它张贴,但没有什么是不能被其他线程已经找到。如果没有解决我的preferred办法,我怎么会去在 DCIM \\摄像机删除位于内部存储的所有图像?谢谢!

Note: I have assigned all the right permissions. Should you need code, I will be happy to post it but there is nothing that cannot be found already in other threads. If there is no solution to my preferred approach, how would I go about deleting all images located in the internal storage at DCIM\Camera? Thank you!

推荐答案

如果你需要重写该行为,不要通过意向拍摄的图像。自己带他们,用android.hardware.Camera API。

If you need to override that behavior, don't take the pictures via intent. Take them yourself, using the android.hardware.Camera API.

这篇关于使相机保持从节约照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆