1

My app saves images to a subfolder of the DCIM folder on the SD-card in the phone.

I do not wish these images to be shown in the androids gallery app.

How can I achive this?

Loofer
  • 6,841
  • 9
  • 61
  • 102
Android Priya
  • 686
  • 1
  • 6
  • 23

3 Answers3

1

add an empty file called .nomedia in the directory where you store the images

Blackbelt
  • 156,034
  • 29
  • 297
  • 305
1

To hide your image file add . to file name for example sdcard/DEIM/yourapp/.yourimage.jpg this will hide an Image. If you want to hide one folder add . to the folder name sdcard/DEIM/.yourapp/image1.jpg

Finder
  • 1,217
  • 5
  • 18
  • 46
0

I found this solution: Stop saving photos using Android native camera

The idea is to check which files are in the gallery just before taking the picture and just after it, delete that one that is new.

It's not the cleanest solution but it works.

May It will helps you!

Community
  • 1
  • 1
ULLAS MOHAN.V
  • 1,521
  • 1
  • 19
  • 36