Setup Accura Face Liveness

Method for liveness check.

Future<void> startLiveness() async{
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
try{
var accuraConfs = {
  "face_uri":this.faceMatchURL
};

   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.setEnableOralVerification(true);

   await AccuraLiveness.startLiveness([accuraConfs])
    .then((value) => {
  setState((){
    dynamic result = json.decode(value);
  })
}).onError((error, stackTrace) => {
});
}on PlatformException{}
}

Add this to enable Voice Authentication

AccuraLiveness.setEnableOralVerification(true);

Success: JSON Response {detect: URI?,Face_score: Float,score: Float}

Error: String


Last updated