Android 设备特定相机路径
我当前正在进行的项目要求我将图像/视频存储到与设备本机相机存储它们的文件夹相同的文件夹中。根据我的研究,我发现每个设备都将图像/视频存储为不同的名称。也就是说,Nexus-One 将其相机文件存储在名为“Camera”的文件夹中 (/sdcard/DCIM/Camera)。 HTC Incredible 将其相机文件存储到名为“100MEDIA”的文件夹 (/sdcard/DCIM/100MEDIA)。 Sony Xperia x10 将其相机文件存储在名为“100ANDRO”的文件夹中 (/sdcard/DCIM/100ANDRO)。我想知道是否可以通过编程方式获取此路径,以便我可以将从我的应用程序获取的图像/视频存储到同一位置。???是否有任何 API 可以帮助完成此操作或需要任何解决方法。如果是这样,你也可以建议我吗?
请大家注意,这是非常紧急和重要的。非常感谢并很高兴尽快得到答复。真的很期待大家的回复。提前非常感谢...
The project I am currently working on requires me to store Images/ Videos into the same folder as where the device native Camera stores them. As per my research I have found that each device stores the Images/Videos into a different name. That is Nexus-One stores its Camera files in to folder named "Camera" (/sdcard/DCIM/Camera). HTC Incredible stores its camera files into a folder named "100MEDIA" (/sdcard/DCIM/100MEDIA). Sony Xperia x10 stores its camera files into folder named "100ANDRO" (/sdcard/DCIM/100ANDRO). I want to know if its programatically possible to get this path so that i can store the images/videos taken from my app to the same location.??? Is there any API that may help do it or any work around that is required. If so can u pls suggest me the same.
Please guys this is pretty urgent and important. Would really appreciate and be glad to get a response soon. Really looking forward to the replies. Thanks a ton in advancce...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AFAIK,只能访问视频和照片的 基本目录通过 Environment 类的标准方式。我认为你必须让用户自己配置目标目录。不过,没有什么可以阻止您向用户提出明智的建议。
AFAIK, only the base directory for videos and photos is accessible in a standard way through the Environment class. I think you'll have to let the user configure the target directory themselves. Nothing prevents you from making intelligent suggestions to the user, though.