Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No result when taking image with camera #827

Closed
risingwolf21 opened this issue Apr 3, 2021 · 1 comment
Closed

No result when taking image with camera #827

risingwolf21 opened this issue Apr 3, 2021 · 1 comment

Comments

@risingwolf21
Copy link

risingwolf21 commented Apr 3, 2021

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?

@Canato
Copy link

Canato commented Apr 3, 2021

@risingwolf21
🚨🚨🚨🚨🚨 THIS LIBRARY IS NOT MAINTAINED, PLEASE READ THIS 🚨🚨🚨🚨🚨 #818

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants