Android : Saving photos to DCIM/Camera - why aren't they showing up in Photos app?

on Monday, October 6, 2014


I've got a custom camera app.


I'm saving the images (after doing some processing) using a FOS, writing the jpeg bytes I've gotten after using OpenCV Mats to manipulate the image:



File photo=new File(dir, getFileName()); // [external_storage]/DCIM/Camera/id.jpg
FileOutputStream fos=new FileOutputStream(photo.getPath());
fos.write(jpeg[0]);
fos.close();


Using a file manager, I can see that the images are saved correctly to the DCIM/Camera directory, along with photos taken using the Google camera app. However they are not shown in the Photos app on the phone. Do I need to set some kind of EXIF data for this to happen, or is there something else going on?


0 comments:

Post a Comment