I have this code which runs when the user presses a button:
fun takeImage(fragment: Fragment?) {
Dexter.withActivity(fragment?.activity)
.withPermissions(Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE)
.withListener(object : BaseMultiplePermissionsListener() {
override fun onPermissionsChecked(report: MultiplePermissionsReport?) {
if (report?.areAllPermissionsGranted() == true)
EasyImage.openChooserWithGallery(fragment, fragment?.getString(R.string.select_image), 0)
else
// Show Error
}
})
.check()
}
I want the camera to open with a white rectangle as a placeholder, so the user can fit the card that needs to be photographed in it, something like this: https://i.stack.imgur.com/QurcT.png
I am using EasyImage to open camera view, how should I do that rectangle?