Я проверяю оба URL (imageUri.getPath()
& result.getUri().toString()
), но не могу использовать для загрузки фотографии. File file = new File(mediaPath);
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == CropImage.PICK_IMAGE_CHOOSER_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
Uri imageUri = CropImage.getPickImageResultUri(this, data);
Log.i("RESPONSE getPath", imageUri.getPath());
CropImage.activity(imageUri)
.setGuidelines(CropImageView.Guidelines.ON)
.setMultiTouchEnabled(true)
.setRequestedSize(800, 800)
.setAspectRatio(1,1)
.start(this);
}
if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
CropImage.ActivityResult result = CropImage.getActivityResult(data);
if (resultCode == RESULT_OK) {
Log.i("RESPONSE getUri", result.getUri().toString());
imageview.setImageURI(result.getUri());
}
}
}