Android 修改Camera拍照的默认保存路径
前言
欢迎大家我分享和推荐好用的代码段~~
声明
欢迎转载,但请保留文章原始出处:
CSDN:http://www.csdn.net
雨季o莫忧离:http://blog.csdn.net/luckkof
正文
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 = 您想要的目录名;
做完以上修改后,拍的照片就会默认保存在您定义的
补充:移动开发 , Android ,