CYRUS-STUDIO / ImagePicker

Android下的图片选择与裁剪开源库(android image picker and cropper library)
http://www.jianshu.com/p/35ce3b82773e
239 stars 68 forks source link

拍照多张 都是同一张照片 #11

Open SuezhouAndroid opened 7 years ago

SuezhouAndroid commented 7 years ago

拍照多张 都是同一张照片

CYRUS-STUDIO commented 7 years ago

@SuezhouAndroid ??

longalei commented 6 years ago

@SuezhouAndroid @linchaolong 造成这个原因的代码如下:

CropImage类中
  /**
     * Get URI to image received from capture  by camera.
     *
     * @param context used to access Android APIs, like content resolve, it is your activity/fragment/widget.
     */
    public static Uri getCaptureImageOutputUri(@NonNull Context context) {
        Uri outputFileUri = null;
        File getImage = context.getExternalCacheDir();
        if (getImage != null) {
            outputFileUri = Uri.fromFile(new File(getImage.getPath(), "pickImageResult.jpeg"));
//这里把后缀名pickImageResult加上时间戳。
        }
        return outputFileUri;
    }