'ArthurHub/Android-Image-Cropper

I am experiencing one weird thing while using ArthurHub/Android-Image-Cropper, everything works fine, the image is sent to crop activity and cropped image is retrieved to ImageView. However, when I press crop button to launch Crop Activity the original image is saved in the gallery by itself. Please help.

Here is the code:

   mBinding.btnCrop.setOnClickListener {
        filteredBM.value?.let {


            val uri = getImageUri(this, it)
            imageUri = uri

         CropImage.activity(imageUri)
             .start(this)





        }


    } 

So the image is already in the image view when launching crop activity. In onActivityResult I put the cropped image into that image view and everything works fine except for that original image being saved in the gallery.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source