In Android 2.2 and newer, you can get the default camera folder using Environment.DIRECTORY_DCIM, but is there a way to get it in Android 2.1 and earlier?
No, sorry. You can try:
new File(Environment.getExternalStorageDirectory(), "DCIM")
and see how stable that is.
Bear in mind that neither my technique nor Environment.DIRECTORY_DCIM will necessarily be honored by all devices. When the Android documentation refers to Environment.DIRECTORY_DCIM as the "traditional location for pictures and videos when mounting the device as a camera" (emphasis mine), a warning bell should be going off in your mind. Just because it is "traditional" does not mean any device manufacturer will necessarily use it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With