0

I am using an ACTION_IMAGE_CAPTURE Intent to take photos, which I then manipulate.

I want to save only the final image. How can I prevent photos from being saved immediately after photo is taken?

Fengson
  • 4,751
  • 8
  • 37
  • 62

2 Answers2

1

Your best bet is to copy the image returned in the result Intent and then use a ContentResolver to delete the original image. The different OEMs, of course, have different camera implementations. The procedure I described has worked with all of them from my testing.

This is assuming that there's some reason that you can't just manipulate the original image and write over it.

ashishduh
  • 6,629
  • 3
  • 30
  • 35
0

If you use a third-party app to take the picture for you:

  • The third-party app has to save the picture, because otherwise it cannot get the picture to you

  • The third-party app can do whatever else it wants, because it was written by somebody else, and they can do what they want

If that is unacceptable, do not use third-party apps to take the picture for you.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491