I want to crop an image in my application when it is selected from gallery. i.e if I launch the gallery and select an image the cropping window should come like when we sele
Nobody will tell you which extra is needed unless you try it:
val intent = Intent(Intent.ACTION_PICK)
intent.apply {
type = "image/*"
putExtra("crop", "true") // NOTE: should be string
putExtra("outputX", 300) // This is needed, editor can't close without these two
putExtra("outputY", 300) // This is needed
putExtra("scale", true)
putExtra("aspectX", 1)
putExtra("aspectY", 1)
putExtra("return-data", true)
}
startActivityForResult(intent, YOUR_INT_CODE)