我想编写一个模块来获取仅摄像头捕获图像的路径。我发现目录dcim方法返回dcim目录路径但我想知道哪个是相机捕获的图像路径或是否有任何相机意图得到这个。请帮忙...我的代码看起来像这样:
public static File readPathImages()
{
File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM);
if (path.exists())
{
File test1 = new File(path, "Camera/");
if (test1.exists())
path = test1;
else {
File test2 = new File(path, "100ANDRO/");
if (test2.exists())
path = test2;
else {
File test3 = new File(path, "100MEDIA/");
if (test3.exists()) {
path = test3;
}
}
}
}
return path;
}