如何知道在SD卡上的图像都被存储,DCIM /摄像机,DCIM / 100MEDIA? [英] How to know where on the SD card the images are being stored, DCIM/Camera, DCIM/100MEDIA?

查看:486
本文介绍了如何知道在SD卡上的图像都被存储,DCIM /摄像机,DCIM / 100MEDIA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序的方法,其文件夹,并将其复制检索我的 DCIM /摄像头上次保存的图像到SD卡上的其他位置。我只是测试它在另一部手机,发现保存到 DCIM / 100MEDIA 它的默认值。我如何能得到这条道路?

I have a method in my application which retrieves the last saved image in my DCIM/Camera folder and copies it to another location on the SD card. I've just tested it on another phone and found that it defaults saving to DCIM/100MEDIA. How am I able to get this path?

我结束了写一些code,它穿过DCIM文件夹所有文件夹循环和检索的上次更改时间()文件夹的路径。

推荐答案

看起来是和厂商有关。除了使用书中所描述的方法,似乎也允许用户选择/覆盖默认你发现的用户将是一个重要的选择。

Looks like it is manufacturer dependent. In addition to using methods described in book, it seems also allowing the user to choose/override the default you "discover" would be an important option.

从临Android的3:P 579

From Pro Android 3: p 579

不幸的是,没有一个方法调用来告诉你哪些目录可能使用的 DCIM 目录下的摄像头   图片。有几个方法虽然能告诉你在哪里了   SD卡的顶部是。第一个是    Environment.getExternalStorageDirectory()并返回文件对象   用于SD卡的顶层目录

Unfortunately, there is not a method call to tell you which directory might be used underneath the DCIM directory for Camera pictures. There are a couple of methods though to tell you where the top of the SD card is. The first is Environment.getExternalStorageDirectory() and it returns a File object for the top-level directory for the SD card.

请参阅下面的谷歌图书链接以整页文本: http://books.google.com/books?id=RuN0jb4YASwC& ; PG = PA579和放大器; LPG = PA579

See the following Google books link for full page text: http://books.google.com/books?id=RuN0jb4YASwC&pg=PA579&lpg=PA579

  • 其他参考:

<一个href="http://stackoverflow.com/questions/4173204/do-all-android-phones-with-a-built-in-camera-use-a-folder-called-dcim-to-store">Do所有Android手机配有内置摄像头使用了一种叫做&QUOT文件夹; DCIM&QUOT;存储拍摄的图像?

<一个href="http://androidforums.com/android-lounge/5930-definitive-androids-folder-structure.html#post239353" rel="nofollow">http://androidforums.com/android-lounge/5930-definitive-androids-folder-structure.html#post239353

这篇关于如何知道在SD卡上的图像都被存储,DCIM /摄像机,DCIM / 100MEDIA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆