How to find out where images, DCIM / Camera, DCIM / 100MEDIA are stored on the SD card?

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?

In the end, I wrote code that looped around all the folders in the DCIM folder and got the path to the lastModified () folder.

+5
source share
2 answers

, . , , , / , "" .

Pro Android 3: p 579

, , , DCIM . , , SD-. Environment.getExternalStorageDirectory() File SD-.

. 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

+5

, :

File picDir;            
if (Build.VERSION.SDK_INT > 7)
    picDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
else
    picDir = new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "Pictures/");

, . this.

0

All Articles