Setup Accura Face Liveness
Method for liveness check.
Contact to connect@accurascan.com to get API or liveness SDK
Future<void> startLiveness() async{
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
try{
var accuraConfs = {
"face_uri":""
};
await AccuraLiveness.setLivenessFeedbackTextSize(18);
await AccuraLiveness.setLivenessFeedBackframeMessage("Frame Your Face");
await AccuraLiveness.setLivenessFeedBackAwayMessage("Move Phone Away");
await AccuraLiveness.setLivenessFeedBackOpenEyesMessage("Keep Your Eyes Open");
await AccuraLiveness.setLivenessFeedBackCloserMessage("Move Phone Closer");
await AccuraLiveness.setLivenessFeedBackCenterMessage("Move Phone Closer");
await AccuraLiveness.setLivenessFeedbackMultipleFaceMessage("Multiple Face Detected");
await AccuraLiveness.setLivenessFeedBackFaceSteadymessage("Keep Your Head Straight");
await AccuraLiveness.setLivenessFeedBackBlurFaceMessage("Blur Detected Over Face");
await AccuraLiveness.setLivenessFeedBackGlareFaceMessage("Glare Detected");
await AccuraLiveness.setLivenessBlurPercentage(80);
await AccuraLiveness.setLivenessGlarePercentage_0(-1);
await AccuraLiveness.setLivenessGlarePercentage_1(-1);
await AccuraLiveness.setLivenessFeedBackLowLightMessage("Low light detected");
await AccuraLiveness.setLivenessfeedbackLowLightTolerence(39);
await AccuraLiveness.setLivenessURL("You Liveness Url");
await AccuraLiveness.startLiveness([accuraConfs])
.then((value) => {
setState((){
dynamic result = json.decode(value);
})
}).onError((error, stackTrace) => {
});
}on PlatformException{}
}
Success: JSON Response {detect: URI?, face_score: Float, score: Float}
Error: String
Last updated