I would like to detect the camera folder on every Android device. From what I\'ve read this folder differs from an manufacturer to another and there is no guarantee that the
There are dozens, perhaps hundreds, of camera apps that ship with devices, to go along with thousands of camera apps available for download. None have to use a particular "camera folder" and none have to have their images indexed by MediaStore
.
The conventional "camera folder" for a device will be in the location specified by Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)
. That directory might not exist yet, if no camera app has used it. But, again, there is no requirement that a camera app use it -- they can store their images wherever they want to, including places that you cannot access (e.g., internal storage, "the cloud").
How can I retrieve only the images taken with the camera ?
You can't. There are well over one billion smartphones on the planet, and any phone could have pictures on it taken by any camera from any other phone, courtesy of photo-sharing apps and sites. This is on top of pictures taken by cameras other than smartphones. There is no requirement that images taken by the device's own camera need to be somehow designated as such for your benefit.