Problem Calling CropImage.getActivityResult from Java
Hi there I'm coming from the old repository due I'm having problems with Android 11 when accepting the Photo but when I'm trying to get the result from the activity I can't get the result due it's not static, reviewing the Java version has the static modifier
@Nullable
public static ActivityResult getActivityResult(@Nullable Intent data) {
return data != null ? (ActivityResult) data.getParcelableExtra(CROP_IMAGE_EXTRA_RESULT) : null;
}
but the kt file doesn't have the @JvmStatic
/**
* Get [CropImageActivity] result data object for crop image activity started using [ ][.activity].
*
* @param data result data intent as received in onActivityResult(int, int, Intent).
* @return Crop Image Activity Result object or null if none exists
*/
// TODO don't return null
fun getActivityResult(data: Intent?): ActivityResult? =
data?.getParcelableExtra<Parcelable>(CROP_IMAGE_EXTRA_RESULT) as? ActivityResult?
Is the intended behavior? I cant figure out how to use that method, any advice will be welcome

Hello @NmMedina welcome to the lib
Please check this discussion
We add some @JvmStatic but look like we always need more.
So, before make n comments and releases for each method is better we do just one!
For this we need to add a Java Sample code, to be sure is working.
Please feel free to add the Java Sample and open a PR for it
Hi, @Canato Thanks for the fast response! Perfect I going to work on this example and make a PR
Let this open, so people know you are working on this!
Will link with the discussion
Hello
I really need help on this, my codes is full on java so need this library working on java too.
What should I do to help you fix this bug?
I still new in PR that you mentioned, trying to push my sample in separate branch but not working. Attached is my java sample code, hope you can help me to check it. Uploading SExtendActivityJava.java.txt…
Thank you
Hey @junaediwidjojo thanks for being involved =D.
To add a PR you will need to create a fork form the repository and create the PR from your forkRepo to this repo.
On the top right corner of github you can see

The latest button is the one you wanna.
Later you will be able to open a PR like this:

As well, please take a read in the CONTRIBUTING GUIDE
For this work we need some stuffs:
- Java sample code using all methods, like we have in kotlin
- Add
@JVMStaticwhere need
meanwhile this is simple workaround:
data.getParcelableExtra(CropImage.CROP_IMAGE_EXTRA_RESULT)
CropImage.getPickImageChooserIntent, getPickImageResultUri also can`t be called from Java
CropImage.getPickImageChooserIntent, getPickImageResultUri also can`t be called from Java
please open a PR or issue for this.