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
@Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) { CropImage.ActivityResult result = CropImage.getActivityResult(data); if (resultCode == RESULT_OK && result != null) { Uri resultUri = result.getUri(); try { Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), resultUri); evaluateImage(bitmap); } catch (IOException e) { e.printStackTrace(); } } } }
But this only works when I select an image from my gallery. When I try to take an image with the camera and confirm the image afterwards, I get redirected to the MainActivity. I don't have a chance to crop the image i just took. Is there something I'm missing?
The text was updated successfully, but these errors were encountered:
So I start the ImageCropper like this:
findViewById(R.id.fab).setOnClickListener(v -> CropImage.activity() .setGuidelines(CropImageView.Guidelines.ON) .setFixAspectRatio(true) .setAspectRatio(1, 1) .start(this));
And try to retrieve the result of it like this:
@Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) { CropImage.ActivityResult result = CropImage.getActivityResult(data); if (resultCode == RESULT_OK && result != null) { Uri resultUri = result.getUri(); try { Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), resultUri); evaluateImage(bitmap); } catch (IOException e) { e.printStackTrace(); } } } }
But this only works when I select an image from my gallery. When I try to take an image with the camera and confirm the image afterwards, I get redirected to the MainActivity. I don't have a chance to crop the image i just took. Is there something I'm missing?
The text was updated successfully, but these errors were encountered: