首页 > 网站 > 建站经验 > 正文

A!ndroid 修改Camera拍照的默认保存路径

2019-11-02 15:23:38
字体:
来源:转载
供稿:网友

   Camera拍照的默认保存路径的修改方法为, 打开storage.java

  将:

  public static void updateDefaultD

搞笑图片大全[www.62-6.com/1/pic/]
irectory(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 = 您想要的目录名;

  做完以上修改后,拍的照片就会默认保存在您定义的目录下.

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表