ImagePicker
ImagePicker copied to clipboard
Not able to use registerForActivityResult in java file
how to use this code in java file
ImagePicker.with(this) .compress(1024) //Final image size will be less than 1 MB(Optional) .maxResultSize(1080, 1080) //Final image resolution will be less than 1080 x 1080(Optional) .createIntent { intent -> startForProfileImageResult.launch(intent) }
Try this:
ImagePicker.with(activity)
.compress(1024)
.maxResultSize(1080, 1080)
.createIntent( intent -> {
startForProfileImageResult.launch(intent);
return Unit.INSTANCE;
});