Liveness Check
- You can add a custom instructional image for the liveness check animation. If not set, the default image is used:
DocReader.shared.customization.livenessAnimationImage = UIImage(named: "icon")
[RGLDocReader shared].customization.livenessAnimationImage = [UIImage imageNamed:@"icon"];
DocumentReader.Instance().customization().edit().setLivenessAnimationImage(getDrawable(R.drawable.icon)).apply()
DocumentReader.Instance().customization().edit().setLivenessAnimationImage(getDrawable(R.drawable.icon)).apply();
DocumentReader.instance.customization.livenessAnimationImage = await rootBundle.load("icon");
DocumentReader.setCustomization({
livenessAnimationImage: "Base64String",
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
livenessAnimationImage: "Base64String"
});
DocumentReader.setCustomization({
livenessAnimationImage: "Base64String",
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetLivenessAnimationImage(GetDrawable(Resource.Drawable.icon)).Apply();
// iOS
RGLDocReader.Shared.Customization.LivenessAnimationImage = UIImage.FromBundle("icon.png");
- To change the scaling of the liveness check instructional animation image, use:
DocReader.shared.customization.livenessAnimationImageContentMode = UIView.ContentMode.scaleAspectFit
[RGLDocReader shared].customization.livenessAnimationImageContentMode = UIViewContentModeScaleAspectFit;
DocumentReader.Instance().customization().edit()
.setLivenessAnimationImageScaleType(ImageView.ScaleType.MATRIX)
.setLivenessAnimationImageMatrix(Matrix())
.apply()
DocumentReader.Instance().customization().edit()
.setLivenessAnimationImageScaleType(ImageView.ScaleType.MATRIX)
.setLivenessAnimationImageMatrix(new Matrix())
.apply();
DocumentReader.instance.customization.livenessAnimationImageTransformsIOS = ViewContentMode.SCALE_ASPECT_FIT;
DocumentReader.instance.customization.livenessAnimationImageTransformsAndroid = [];
DocumentReader.setCustomization({
livenessAnimationImageContentMode: Enum.UIViewContentMode.ScaleAspectFit,
livenessAnimationImageMatrix: [],
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
livenessAnimationImageContentMode: Enum.UIViewContentMode.ScaleAspectFit,
livenessAnimationImageMatrix: []
});
DocumentReader.setCustomization({
livenessAnimationImageContentMode: Enum.UIViewContentMode.ScaleAspectFit,
livenessAnimationImageMatrix: [],
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetLivenessAnimationImageScaleType(ImageView.ScaleType.Matrix).Apply();
Matrix matrix = new Matrix();
DocumentReader.Instance().Customization().Edit().SetLivenessAnimationImageMatrix(matrix).Apply();
// iOS
RGLDocReader.Shared.Customization.LivenessAnimationImageContentMode = UIViewContentMode.ScaleAspectFit;
- Change the vertical position of the liveness check instructional animation image:
DocReader.shared.customization.livenessAnimationPositionMultiplier = 0.5
[RGLDocReader shared].customization.livenessAnimationPositionMultiplier = 0.5;
DocumentReader.Instance().customization().edit().setLivenessAnimationPositionMultiplier(0.5f).apply()
DocumentReader.Instance().customization().edit().setLivenessAnimationPositionMultiplier(0.5f).apply();
DocumentReader.instance.customization.livenessAnimationPositionMultiplier = .5;
DocumentReader.setCustomization({
livenessAnimationPositionMultiplier: 0.5,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setCustomization({
livenessAnimationPositionMultiplier: 0.5
});
DocumentReader.setCustomization({
livenessAnimationPositionMultiplier: 0.5,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().Customization().Edit().SetLivenessAnimationPositionMultiplier((Java.Lang.Float)0.5F).Apply();
// iOS
RGLDocReader.Shared.Customization.LivenessAnimationPositionMultiplier = 0.5F;