Android 修改Camera拍照的默认保存路径
发布时间:2015-06-05 来源:查字典编辑
摘要:Camera拍照的默认保存路径的修改方法为,打开storage.java将:publicstaticvoidupdateDefaultDir...
Camera拍照的默认保存路径的修改方法为, 打开storage.java
将:
public static void updateDefaultDirectory(Activity activity, boolean stillCapture) {
String defaultPath = StorageManager.getDefaultPath();
MOUNT_POINT = defaultPath;
Log.i(TAG, "Write default path =" + defaultPath);
if (Util.CU) {
DCIM = stillCapture ? (MOUNT_POINT + "/Photo") : (MOUNT_POINT + "/Video");
DIRECTORY = DCIM;
} else {
DCIM = MOUNT_POINT + "/DCIM";
DIRECTORY = DCIM + "/Camera";
}
BUCKET_ID = String.valueOf(DIRECTORY.toLowerCase().hashCode());
中的DIRECTORY=DCIM+”/Camera” 改为DIRECTORY = 您想要的目录名;
做完以上修改后,拍的照片就会默认保存在您定义的目录下.