Open donhill opened 2 years ago
This is how I fixed my latest issue with this library. I found the following in a PR and use this in my build.gradle
Add to gradle implementation 'com.github.ravindu1024:Android-Image-Cropper:2.8.2'
implementation 'com.github.ravindu1024:Android-Image-Cropper:2.8.2'
After this the gallery/camera wasn't allowed a camera selection
allowed
I added the following chooser, after that everything that I needed was fixed.
the function used to allow the user to select files, camera, and gallery
`fun imageSourceChooser() { val documentsIntent = Intent(Intent.ACTION_GET_CONTENT) documentsIntent.type = "image/*"
val otherGalleriesIntent = Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI) otherGalleriesIntent.type = "image/*" val camera = Intent(MediaStore.ACTION_IMAGE_CAPTURE) val chooserIntent = Intent.createChooser( documentsIntent, getString(R.string.pick_image_intent_chooser_title) ).putExtra(Intent.EXTRA_INITIAL_INTENTS, arrayOf(otherGalleriesIntent, camera)) startActivityForResult( chooserIntent, CropImage.PICK_IMAGE_CHOOSER_REQUEST_CODE )
}`
This is how I fixed my latest issue with this library. I found the following in a PR and use this in my build.gradle
Add to gradle
implementation 'com.github.ravindu1024:Android-Image-Cropper:2.8.2'
After this the gallery/camera wasn't
allowed
a camera selectionI added the following chooser, after that everything that I needed was fixed.
the function used to allow the user to select files, camera, and gallery
`fun imageSourceChooser() { val documentsIntent = Intent(Intent.ACTION_GET_CONTENT) documentsIntent.type = "image/*"
}`