0

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.

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.

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!

Eric Tobias
  • 3,225
  • 4
  • 32
  • 50
  • If I remember correctly, the Ally Bank check deposit feature does something similar. However, [they don't seem to be using the Camera app](http://i.imgur.com/oyGEd3S.png). – kush Mar 14 '13 at 14:37
  • I am not sure I understand your comment. Could you explain what the Ally Bank check deposit feature is? – Eric Tobias Mar 14 '13 at 15:37
  • You'd take a picture with your iOS/Android device and the app would send the pictures (I'm hoping in a secure way) back to the bank without keeping a copy of it in local storage[1](http://www.ally.com/bank/online-banking/go-mobile.html). Chase does something similar as far as I know. It looks like they are not using the camera app but doing what Gabe Sechan suggests in his answer below. Sorry if I was off-topic. – kush Mar 14 '13 at 16:45

1 Answers1

2

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

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127