Skip to content

Commit

Permalink
Merge pull request #147 from BlinkID/release/5.4.0
Browse files Browse the repository at this point in the history
Release/5.4.0
  • Loading branch information
i1E authored Apr 29, 2020
2 parents ec5c1b2 + c4f65b2 commit 6391a01
Show file tree
Hide file tree
Showing 39 changed files with 855 additions and 385 deletions.
2 changes: 1 addition & 1 deletion BlinkID/blinkid-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pod::Spec.new do |s|
s.header_dir = "blinkid-react-native"

s.dependency 'React'
s.dependency 'PPBlinkID', '~> 5.3.0'
s.dependency 'PPBlinkID', '~> 5.4.0'

s.frameworks = 'UIKit'
end
4 changes: 2 additions & 2 deletions BlinkID/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const BlinkIDNative = Platform.select({

/**
* This exposes the appropriate native BlinkID module module as a JS module, based on
* detected platvorm: Android or iOS. This has a
* function 'scan' which takes the following parameters:
* detected platform: Android or iOS. This has functions:
* -> 'scanWithCamera' which takes the following parameters:
* 1. Object overlaySettings: instance of OverlaySettings, contains settings for desired camera overlay
* 2. RecognizerCollection recognizerCollection: object containing recognizers to use for scanning
* 3. String license: BlinkID base64 license key bound to application ID for Android or iOS. To obtain
Expand Down
12 changes: 12 additions & 0 deletions BlinkID/overlays/blinkidOverlays.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@ export class BlinkIdOverlaySettings extends OverlaySettings {
*/
this.backSideScanningTimeoutMilliseconds = 17000;

/**
* Message that is shown while scanning the barcode.
* If null, default value will be used.
*/
this.scanBarcodeText = null;

/**
* Instructions for the user to move the document from the edge.
* If null, default value will be used.
*/
this.errorDocumentTooCloseToEdge = null;

}
}

Expand Down
2 changes: 1 addition & 1 deletion BlinkID/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blinkid-react-native",
"version": "5.3.0",
"version": "5.4.0",
"description": "A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).",
"main": "index.js",
"repository": {
Expand Down
96 changes: 69 additions & 27 deletions BlinkID/recognizers/blinkIdCombinedRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import {
DocumentFaceDetectorType,
ImageExtensionFactors,
DataMatchResult,
Country,
Region,
Type,
DocumentImageColorStatus,

} from '../types'

Expand All @@ -19,7 +23,7 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
super(nativeResult.resultState);

/**
* The additional address information of the document owner.
* The additional address information of the document owner.
*/
this.additionalAddressInformation = nativeResult.additionalAddressInformation;

Expand All @@ -33,6 +37,18 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
*/
this.address = nativeResult.address;

/**
* The current age of the document owner in years. It is calculated difference
* between now and date of birth. Now is current time on the device.
* @return current age of the document owner in years or -1 if date of birth is unknown.
*/
this.age = nativeResult.age;

/**
* The classification information.
*/
this.classInfo = nativeResult.classInfo;

/**
* The driver license conditions.
*/
Expand All @@ -59,12 +75,12 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null;

/**
* Digital signature of the recognition result. Available only if enabled with signResult property.
* Digital signature of the recognition result. Available only if enabled with signResult property.
*/
this.digitalSignature = nativeResult.digitalSignature;

/**
* Version of the digital signature. Available only if enabled with signResult property.
* Version of the digital signature. Available only if enabled with signResult property.
*/
this.digitalSignatureVersion = nativeResult.digitalSignatureVersion;

Expand All @@ -73,14 +89,24 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
*/
this.documentAdditionalNumber = nativeResult.documentAdditionalNumber;

/**
* Defines possible color statuses determined from scanned image.
*/
this.documentBackImageColorStatus = nativeResult.documentBackImageColorStatus;

/**
* Returns DataMatchResultSuccess if data from scanned parts/sides of the document match,
* DataMatchResultFailed otherwise. For example if date of expiry is scanned from the front and back side
* of the document and values do not match, this method will return DataMatchResultFailed. Result will
* be DataMatchResultSuccess only if scanned values for all fields that are compared are the same.
* be DataMatchResultSuccess only if scanned values for all fields that are compared are the same.
*/
this.documentDataMatch = nativeResult.documentDataMatch;

/**
* Defines possible color statuses determined from scanned image.
*/
this.documentFrontImageColorStatus = nativeResult.documentFrontImageColorStatus;

/**
* The document number.
*/
Expand All @@ -97,7 +123,7 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
this.employer = nativeResult.employer;

/**
* face image from the document if enabled with returnFaceImage property.
* face image from the document if enabled with returnFaceImage property.
*/
this.faceImage = nativeResult.faceImage;

Expand All @@ -107,12 +133,12 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
this.firstName = nativeResult.firstName;

/**
* back side image of the document if enabled with returnFullDocumentImage property.
* back side image of the document if enabled with returnFullDocumentImage property.
*/
this.fullDocumentBackImage = nativeResult.fullDocumentBackImage;

/**
* front side image of the document if enabled with returnFullDocumentImage property.
* front side image of the document if enabled with returnFullDocumentImage property.
*/
this.fullDocumentFrontImage = nativeResult.fullDocumentFrontImage;

Expand Down Expand Up @@ -142,7 +168,7 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
this.maritalStatus = nativeResult.maritalStatus;

/**
* The data extracted from the machine readable zone
* The data extracted from the machine readable zone
*/
this.mrzResult = nativeResult.mrzResult != null ? new MrzResult(nativeResult.mrzResult) : null;

Expand Down Expand Up @@ -183,7 +209,7 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {

/**
* Returns true if recognizer has finished scanning first side and is now scanning back side,
* false if it's still scanning first side.
* false if it's still scanning first side.
*/
this.scanningFirstSideDone = nativeResult.scanningFirstSideDone;

Expand All @@ -204,71 +230,87 @@ export class BlinkIdCombinedRecognizer extends Recognizer {

/**
* Defines whether blured frames filtering is allowed
*
*
*
*
*/
this.allowBlurFilter = true;

/**
* Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed
*
*
*
*
*/
this.allowUnparsedMrzResults = false;

/**
* Defines whether returning unverified MRZ (Machine Readable Zone) results is allowed
* Unverified MRZ is parsed, but check digits are incorrect
*
*
*
*
*/
this.allowUnverifiedMrzResults = true;

/**
* Property for setting DPI for face images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*
*
*/
this.faceImageDpi = 250;

/**
* Property for setting DPI for full document images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*
*
*/
this.fullDocumentImageDpi = 250;

/**
* Image extension factors for full document image.
*
*
* @see ImageExtensionFactors
*
*
*/
this.fullDocumentImageExtensionFactors = new ImageExtensionFactors();

/**
* Pading is a minimum distance from the edge of the frame and is defined as a percentage of the frame width. Default value is 0.0f and in that case
* padding edge and image edge are the same.
* Recommended value is 0.02f.
*
*
*/
this.paddingEdge = 0.0;

/**
* Sets whether face image from ID card should be extracted
*
*
*
*
*/
this.returnFaceImage = false;

/**
* Sets whether full document image of ID card should be extracted.
*
*
*
*
*/
this.returnFullDocumentImage = false;

/**
* Whether or not recognition result should be signed.
*
*
*
*
*/
this.signResult = false;

/**
* Skip back side capture and processing step when back side of the document is not supported
*
*
*/
this.skipUnsupportedBack = false;

this.createResultFromNative = function (nativeResult) { return new BlinkIdCombinedRecognizerResult(nativeResult); }
}
}
Loading

0 comments on commit 6391a01

Please sign in to comment.