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

Retrieve intent extra through CropImageActivity #352

Closed
okaa-pi opened this issue Aug 4, 2017 · 3 comments
Closed

Retrieve intent extra through CropImageActivity #352

okaa-pi opened this issue Aug 4, 2017 · 3 comments

Comments

@okaa-pi
Copy link

okaa-pi commented Aug 4, 2017

Hi.

It's more of an enhancement than an issue.
I would like to send intent Extra to CropImageActivity, and get it back in the onActivityResult.

An exemple :
I have a recyclerview listing my friends. When I select a friend, it opens the image picker/cropper like this:
CropImage.activity()
.setGuidelines(CropImageView.Guidelines.ON)
.start(this)

The problem is that, in onActivityResult, I don't know which friend was selected.
Currently, the only way I found to correct this, is to have a global variable "Friend", that I assign before starting the CropImageActivity, and I use it in onActivityResult.

It works, but it's not the best way to do it. I think it would be better if I could do it like that:
Intent cropIntent = CropImage.activity().getIntent(this);
cropIntent.putExtra("friend", friend);

onActivityResult:
Friend selectedFriend = resultIntent.getParcelableExtra("friend");

Don't you think it would be a good idea?

@ArthurHub
Copy link
Owner

added in 2.5.1

@Magurosenbei
Copy link

Is it possible to propagate extras for the PickImageChooserIntent as well?

@sara1010
Copy link

@ArthurHub can you explain how can i use this library in fragment and send extra data by example?

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

No branches or pull requests

4 participants