How to use the blinkid-react-native.BlinkIdRecognizerResult function in blinkid-react-native

To help you get started, we’ve selected a few blinkid-react-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BlinkID / blinkid-react-native / demoApp / index.js View on Github external
handleResult(result) {
        let fieldDelim = ";\n";
        
        var localState = {
            showImageDocument: false,
            resultImageDocument: '',
            showImageFace: false,
            resultImageFace: '',
            results: '',
            showSuccessFrame: false,
            successFrame: ''
        };
        
        if (result instanceof BlinkIDReactNative.BlinkIdRecognizerResult) {
            let blinkIdResult = result;
            let resultString =
                "First name: " + blinkIdResult.firstName + fieldDelim +
                "Last name: " + blinkIdResult.lastName + fieldDelim +
                "Address: " + blinkIdResult.address + fieldDelim +
                "Document number: " + blinkIdResult.documentNumber + fieldDelim +
                "Sex: " + blinkIdResult.sex + fieldDelim;
            if (blinkIdResult.dateOfBirth) {
                resultString +=
                    "Date of birth: " +
                        blinkIdResult.dateOfBirth.day + "." +
                        blinkIdResult.dateOfBirth.month + "." +
                        blinkIdResult.dateOfBirth.year + "." + fieldDelim;
            }
            if (blinkIdResult.dateOfIssue) {
                resultString +=