1

https://developer.android.com/training/camera/photobasics.html

I followed example of Google but using:

File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);

I have my photo in Picture folder but my device do save an other copy of the photo in DCIM folder (with different timestamp). eg: i got a photo My_prefix_20180122_171255.jpg in Picture and an other IMG_20180122_171300.jpg in DCIM. How to avoid this?

(Tested on Android 4.4, Android 6.0.)

Thanks.

Anh-Tuan Mai
  • 1,129
  • 19
  • 36

1 Answers1

2

i got a photo My_prefix_20180122_171255.jpg in Picture and an other IMG_20180122_171300.jpg in DCIM

That behavior will vary by camera app. There are hundreds of camera apps, both pre-installed on devices and available for users to install via the Play Store and elsewhere.

How to avoid this?

Do not use a third-party camera app to take the picture. Take it yourself, either by using the camera APIs directly, or by using a third-party camera library (e.g., Fotoapparat, CameraKit-Android).

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