I have a method in my application that retrieves the last saved image in my folder DCIM/Cameraand copies it to another location on the SD card. I just tested it on another phone and found that it saves the value by default DCIM/100MEDIA. How can I get this way?
DCIM/Camera
DCIM/100MEDIA
In the end, I wrote code that looped around all the folders in the DCIM folder and got the path to the lastModified () folder.
, . , , , / , "" .
Pro Android 3: p 579
, , , DCIM . , , SD-. Environment.getExternalStorageDirectory() File SD-.
DCIM
Environment.getExternalStorageDirectory()
File
. Google : http://books.google.com/books?id=RuN0jb4YASwC&pg=PA579&lpg=PA579
Android "DCIM" ?
http://androidforums.com/android-lounge/5930-definitive-androids-folder-structure.html#post239353
, :
File picDir; if (Build.VERSION.SDK_INT > 7) picDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); else picDir = new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "Pictures/");
, . this.