WEB开发网
开发学院手机开发Android 开发 Android 修改Camera拍照的默认保存路径 阅读

Android 修改Camera拍照的默认保存路径

 2013-10-31 15:14:17 来源:WEB开发网   
核心提示: Camera拍照的默认保存路径的修改方法为, 打开storage.java将:public static void updateDefaultDirectory(Activity activity, boolean stillCapture) {String defaultPath = StorageManager.

 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 = 您想要的目录名;
做完以上修改后,拍的照片就会默认保存在您定义的目录下.

Tags:Android 修改 Camera

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接