only_for_trial 0.0.2 copy "only_for_trial: ^0.0.2" to clipboard
only_for_trial: ^0.0.2 copied to clipboard

outdated

Flutter project.

only_for_trial

Note:- Add only_for_trial under dependencies in your pubspec.yaml file. Setup Android Add this permissions into Android’s AndroidManifest.xml file.

Usage Import flutter library into file. import 'package:flutter_accura_ocr/flutter_accura_ocr.dart'; ➜ Get license configuration from SDK. It returns all active functionalities of your license.

try { await OnlyForTrial.setFaceBlurPercentage(80); await OnlyForTrial.setHologramDetection(true); await OnlyForTrial.setLowLightTolerance(10); await OnlyForTrial.setMotionThreshold(25); await OnlyForTrial.setMinGlarePercentage(6); await OnlyForTrial.setMaxGlarePercentage(99); await OnlyForTrial.setBlurPercentage(60); await OnlyForTrial.setCameraFacing(0); await OnlyForTrial.isCheckPhotoCopy(false);

await OnlyForTrial.SCAN_TITLE_OCR_FRONT("Scan Front side of "); await OnlyForTrial.SCAN_TITLE_OCR_BACK("Scan Back side of "); await OnlyForTrial.SCAN_TITLE_OCR("Scan "); await OnlyForTrial.SCAN_TITLE_MRZ_PDF417_FRONT("Scan Front Side of Document"); await OnlyForTrial.SCAN_TITLE_MRZ_PDF417_BACK("Scan Back Side of Document"); await OnlyForTrial.SCAN_TITLE_DLPLATE("Scan Number plate"); await OnlyForTrial.SCAN_TITLE_BARCODE("Scan Barcode"); await OnlyForTrial.SCAN_TITLE_BANKCARD("Scan BankCard");

await OnlyForTrial.ACCURA_ERROR_CODE_MOTION("Keep Document Steady"); await OnlyForTrial.ACCURA_ERROR_CODE_DOCUMENT_IN_FRAME("Keep document in frame"); await OnlyForTrial.ACCURA_ERROR_CODE_BRING_DOCUMENT_IN_FRAME("Bring card near to frame"); await OnlyForTrial.ACCURA_ERROR_CODE_PROCESSING("Processing"); await OnlyForTrial.ACCURA_ERROR_CODE_BLUR_DOCUMENT("Blur detect in document"); await OnlyForTrial.ACCURA_ERROR_CODE_FACE_BLUR("Blur detected over face"); await OnlyForTrial.ACCURA_ERROR_CODE_GLARE_DOCUMENT("Glare detect in document"); await OnlyForTrial.ACCURA_ERROR_CODE_HOLOGRAM("Hologram Detected"); await OnlyForTrial.ACCURA_ERROR_CODE_DARK_DOCUMENT("Low lighting detected"); await OnlyForTrial.ACCURA_ERROR_CODE_PHOTO_COPY_DOCUMENT("Can not accept Photo Copy Document"); await OnlyForTrial.ACCURA_ERROR_CODE_FACE("Face not detected"); await OnlyForTrial.ACCURA_ERROR_CODE_MRZ("MRZ not detected"); await OnlyForTrial.ACCURA_ERROR_CODE_PASSPORT_MRZ("Passport MRZ not detected"); await OnlyForTrial.ACCURA_ERROR_CODE_ID_MRZ("ID MRZ not detected"); await OnlyForTrial.ACCURA_ERROR_CODE_VISA_MRZ("Visa MRZ not detected"); await OnlyForTrial.ACCURA_ERROR_CODE_UPSIDE_DOWN_SIDE("Document is upside down. Place it properly"); await OnlyForTrial.ACCURA_ERROR_CODE_WRONG_SIDE("Scanning wrong side of Document"); await OnlyForTrial.isShowLogo(0);

await OnlyForTrial.getMetaData().then((value) => dynamic result = json.decode(value); }on PlatformException{}

Error: String Success: JSON String Response = { countries: Array[

➜ Method for scan MRZ documents. Future

MRZType: String value: other_mrz or passport_mrz or id_mrz or visa_mrz CountryList: String value: all or IND,USA Success: JSON Response { front_data: JSONObjects?, back_data: JSONObjects?, type: Recognition Type, face: URI? front_img: URI? back_img: URI? } Error: String ➜ Method for scan OCR documents. Future

CountryId: integer value: Id of selected country. CardId: integer value: Id of selected card. CardName: String value: Name of selected card. CardType: integer value: Type of selected card. Success: JSON Response { } Error: String ➜ Method for scan barcode. Future

BarcodeType: String value: Type of barcode documents. Success: JSON Response { } Error: String

➜ Method for scan bankcard. Future

} Success: JSON Response { } Error: String

➜ Method for get face match percentages between two face. Future

await OnlyForTrial.setFaceMatchFeedbackTextSize(18); await OnlyForTrial.setFaceMatchFeedBackframeMessage("Frame Your Face"); await OnlyForTrial.setFaceMatchFeedBackAwayMessage("Move Phone Away"); await OnlyForTrial.setFaceMatchFeedBackOpenEyesMessage("Keep Your Eyes Open"); await OnlyForTrial.setFaceMatchFeedBackCloserMessage("Move Phone Closer"); await OnlyForTrial.setFaceMatchFeedBackCenterMessage("Move Phone Center"); await OnlyForTrial.setFaceMatchFeedbackMultipleFaceMessage("Multiple Face Detected"); await OnlyForTrial.setFaceMatchFeedBackFaceSteadymessage("Keep Your Head Straight"); await OnlyForTrial.setFaceMatchFeedBackLowLightMessage("Low light detected"); await OnlyForTrial.setFaceMatchFeedBackBlurFaceMessage("Blur Detected Over Face"); await OnlyForTrial.setFaceMatchFeedBackGlareFaceMessage("Glare Detected"); await OnlyForTrial.setBlurPercentage(80); await OnlyForTrial.setFaceMatchGlarePercentage_0(-1); await OnlyForTrial.setFaceMatchGlarePercentage_1(-1); await OnlyForTrial.startFaceMatch([accuraConfs]) .then((value) => { setState((){ dynamic result = json.decode(value); }) }).onError((error, stackTrace) => { }); }on PlatformException{} }

accuraConfs: JSON Object face_uri: URI Success: JSON Response { detect: URI? score: Float } Error: String ➜ Method for liveness check. Future

await OnlyForTrial.setLivenessFeedbackTextSize(18); await OnlyForTrial.setLivenessFeedBackframeMessage("Frame Your Face"); await OnlyForTrial.setLivenessFeedBackAwayMessage("Move Phone Away"); await OnlyForTrial.setLivenessFeedBackOpenEyesMessage("Keep Your Eyes Open"); await OnlyForTrial.setLivenessFeedBackCloserMessage("Move Phone Closer"); await OnlyForTrial.setLivenessFeedBackCenterMessage("Move Phone Closer"); await OnlyForTrial.setLivenessFeedbackMultipleFaceMessage("Multiple Face Detected"); await OnlyForTrial.setLivenessFeedBackFaceSteadymessage("Keep Your Head Straight"); await OnlyForTrial.setLivenessFeedBackBlurFaceMessage("Blur Detected Over Face"); await OnlyForTrial.setLivenessFeedBackGlareFaceMessage("Glare Detected"); await OnlyForTrial.setLivenessBlurPercentage(80); await OnlyForTrial.setLivenessGlarePercentage_0(-1); await OnlyForTrial.setLivenessGlarePercentage_1(-1); await OnlyForTrial.setLivenessFeedBackLowLightMessage("Low light detected"); await OnlyForTrial.setLivenessfeedbackLowLightTolerence(39); await OnlyForTrial.setLivenessURL("your liveness url");

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

accuraConfs: JSON Object face_uri: 'uri of face' Success: JSON Response { detect: URI?, Face_score: Float, score: Float, } Error: String ➜ Method for Only Facematch. To Open Gallery 1 and 2:-

For gallery 1 try{ var accuraConfs = { "face1": this.facematchURI, "face2": this.facematchURI2 };

await OnlyForTrial.getGallery1([accuraConfs]).then((value) => { setState(() { dynamic result = json.decode(value); String facematchURI = result["Image"]; if(_result.toString().contains("score")){ String Score = result["score"]; } }) }).onError((error, stackTrace)=>{}); } on PlatformException {}

For gallery 2

try{ var accuraConfs = { "face1": this.facematchURI, "face2": this.facematchURI2 };

await OnlyForTrial.getGallery2([accuraConfs]).then((value) => { setState(() { dynamic result = json.decode(value); String facematchURI2 = result["Image"]; if(result.toString().contains("score")){ String Score = result["score"]; } }) }).onError((error, stackTrace)=>{}); } on PlatformException {}

To Open Camera for Facematch 1 and 2:

For Facematch 1:

try{ var accuraConfs = { "face1": this.facematchURI, "face2": this.facematchURI2 }; await OnlyForTrial.setFaceMatchFeedbackTextSize(18); await OnlyForTrial.setFaceMatchFeedBackframeMessage("Frame Your Face"); await OnlyForTrial.setFaceMatchFeedBackAwayMessage("Move Phone Away"); await OnlyForTrial.setFaceMatchFeedBackOpenEyesMessage("Keep Your Eyes Open"); await OnlyForTrial.setFaceMatchFeedBackCloserMessage("Move Phone Closer"); await OnlyForTrial.setFaceMatchFeedBackCenterMessage("Move Phone Center"); await OnlyForTrial.setFaceMatchFeedbackMultipleFaceMessage("Multiple Face Detected"); await OnlyForTrial.setFaceMatchFeedBackFaceSteadymessage("Keep Your Head Straight"); await OnlyForTrial.setFaceMatchFeedBackLowLightMessage("Low light detected"); await OnlyForTrial.setFaceMatchFeedBackBlurFaceMessage("Blur Detected Over Face"); await OnlyForTrial.setFaceMatchFeedBackGlareFaceMessage("Glare Detected"); await OnlyForTrial.setBlurPercentage(80); await OnlyForTrial.setFaceMatchGlarePercentage_0(-1); await OnlyForTrial.setFaceMatchGlarePercentage_1(-1);

await OnlyForTrial.getCamera1([accuraConfs]).then((value) => { setState(() { dynamic result = json.decode(value); String facematchURI = result["Image"]; if(result.toString().contains("score")){ String Score = result["score"]; } }) }); } on PlatformException {}

For Facematch 2

try{ var accuraConfs = { "face1": this.facematchURI, "face2": this.facematchURI2 }; await OnlyForTrial.setFaceMatchFeedbackTextSize(18); await OnlyForTrial.setFaceMatchFeedBackframeMessage("Frame Your Face"); await OnlyForTrial.setFaceMatchFeedBackAwayMessage("Move Phone Away"); await OnlyForTrial.setFaceMatchFeedBackOpenEyesMessage("Keep Your Eyes Open"); await OnlyForTrial.setFaceMatchFeedBackCloserMessage("Move Phone Closer"); await OnlyForTrial.setFaceMatchFeedBackCenterMessage("Move Phone Center"); await OnlyForTrial.setFaceMatchFeedbackMultipleFaceMessage("Multiple Face Detected"); await OnlyForTrial.setFaceMatchFeedBackFaceSteadymessage("Keep Your Head Straight"); await OnlyForTrial.setFaceMatchFeedBackLowLightMessage("Low light detected"); await OnlyForTrial.setFaceMatchFeedBackBlurFaceMessage("Blur Detected Over Face"); await OnlyForTrial.setFaceMatchFeedBackGlareFaceMessage("Glare Detected"); await OnlyForTrial.setBlurPercentage(80); await OnlyForTrial.setFaceMatchGlarePercentage_0(-1); await OnlyForTrial.setFaceMatchGlarePercentage_1(-1);

await OnlyForTrial.getCamera2([accuraConfs]).then((value) => { setState(() { dynamic result = json.decode(value); String facematchURI2 = result["Image"]; if(result.toString().contains("score")){ String Score = result["score"]; } }) });//.onError((error, stackTrace)=>{print("Not Printing")}); } on PlatformException {}

accuraConfs: JSON Object face1: 'uri of face1' Face2:’uri of face2’ Success: JSON Response { Image: URI?, score: String, } Error: String

CountryModels: type: JSON Array contents: CardItems properties: id: integer name: string Cards: JSON Array CardItems: type: JSON Array contents: JSON Objects properties: id: integer name: string type: integer BarcodeItems: type: JSON Array properties: name: string Recognition Types: MRZ OCR PDF417 BARCODE DL_PLATE Mrz Types: passport_mrz id_mrz visa_mrz other_mrz Mrz Country List: all IND,USA etc... Contributing See the contributing guide to learn how to contribute to the repository and the development workflow. License MIT