Problem
Captured images are written to the Android device's SD card at /DCIM/Camera/
. (even with saveToPhotoGallery option as false)
From the customer:
This is a potential security issue for us because we are capturing images of checks, which contain bank account numbers. We need a way to disable this behavior.
For our purposes it is not sufficient to delete the image after writing it to the file system. Forensics tools can still recover the data from the file system even if the file is deleted. The image can never be written to storage at all.
Here is a sample app.js that reproduces the problem:
{noformat}
Titanium.Media.showCamera({
success:function(event)
{
alert('Success - now check SD card for captured image');
},
cancel:function()
{
alert('cancelled');
},
error:function(error)
{
alert(error);
},
saveToPhotoGallery:false,
mediaTypes:[Ti.Media.MEDIA_TYPE_PHOTO]
});
{noformat}
Will this issue get fixed in the July 1st release.
Created [PR #2475](https://github.com/appcelerator/titanium_mobile/pull/2475) to resolve issue.
Expected behavior for testing with KS Camera Tests: Non HTC Phones: 1. Basic Camera: the image should be stored in sdcard/Pictures folder 2. Camera custom overlay: no image should be store in sdcard (check sdcard/dcim/Camera/KitchenSink and sdcard/Pictures) 3. Camera overlay webview: no image should be store in sdcard (check same locations as #2) 4. SaveToGallery: the image should be stored in sdcard/Pictures folder 5. SaveToFile: the image should be stored in sdcard/dcim/Camera/KitchenSink AND when you exit the app, it should be DELETED. If you're testing with HTC phones, all images stored in sdcard/Pictures will be stored in sdcard/dcim/100media instead.
I have tried using the kitchen sink example code to apply this fix, since it sounds like the only way to never save an image to the external SD is if you use a custom overlay on the camera. So when using the kitchen sink code, even if saveToPhotoGallery is not declared, no image is saved at all (on sd or internally). Here is the code that shows this: http://pastie.org/4332655 Running on Rezound Android 4.0. Any guidance on this fix or how to only save an image to internal storage (without ever saving anything to external) with a code example would be extremely helpful since a customer needs this functionality asap.
I found the error, this commment: If you're testing with HTC phones, all images stored in sdcard/Pictures will be stored in sdcard/dcim/100media instead is incorrect. htc phones will store in sdcard/pictures, not in dcim. closing ticket again.