You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the code for crop mCropView.startCrop(createSaveUri(), mCropCallback, mSaveCallback);
public Uri createSaveUri() {
mCropView.setCompressFormat(Bitmap.CompressFormat.PNG);
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
String imageFileName = "PNG_" + timeStamp + "_.png";
return getFileProviderUri(new File(getActivity().getCacheDir(), imageFileName));
}
private Uri getFileProviderUri(File photoFile) {
Uri photoURI;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
photoURI = FileProvider.getUriForFile(getActivity(),
"com.strangegt.crop.fileprovider",
photoFile);
} else {
photoURI = Uri.fromFile(new File(photoFile.getAbsolutePath()));
}
return photoURI;
}
This code works on 1.1.4,, i get the grop image in the content uri, and can use it
but in 1.1.7 stop working, the file is saved but this call fail, in saveImage method, and dont get success crop Utils.updateGalleryInfo(getContext(), uri);
I think fail because i dont save in external storage
No description provided.
The text was updated successfully, but these errors were encountered: