Skip to content

Commit

Permalink
Merge pull request #141 from BlinkID/release/5.3.0
Browse files Browse the repository at this point in the history
Release/5.3.0
  • Loading branch information
juraskrlec authored Mar 19, 2020
2 parents aefa8f0 + d711139 commit 5d0601a
Show file tree
Hide file tree
Showing 30 changed files with 1,022 additions and 347 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.2.0'
s.dependency 'PPBlinkID', '~> 5.3.0'

s.frameworks = 'UIKit'
end
1 change: 1 addition & 0 deletions BlinkID/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export * from './recognizers/successFrameGrabberRecognizer'
export * from './recognizers/blinkIdCombinedRecognizer'
export * from './recognizers/blinkIdRecognizer'
export * from './recognizers/documentFaceRecognizer'
export * from './recognizers/idBarcodeRecognizer'
export * from './recognizers/mrtdCombinedRecognizer'
export * from './recognizers/mrtdRecognizer'
export * from './recognizers/passportRecognizer'
Expand Down
77 changes: 77 additions & 0 deletions BlinkID/overlays/blinkidOverlays.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,83 @@ export class DocumentOverlaySettings extends OverlaySettings {
export class BlinkIdOverlaySettings extends OverlaySettings {
constructor() {
super('BlinkIdOverlaySettings');
/**
* String: message that is shown while scanning first side of the document.
* If null, default value will be used.
*/
this.firstSideInstructionsText = null;
/**
* String: instructions to flip document, shown when scanning of the first side is done, before scanning the second
* side of the document.
* If null, default value will be used.
*/
this.flipInstructions = null;
/**
* String: instructions for the user to move the document closer.
* If null, default value will be used.
*/
this.errorMoveCloser = null;
/**
* String: instructions for the user to move the document farther.
* If null, default value will be used.
*/
this.errorMoveFarther = null;
/**
* String: title of the dialog, which is shown when scanned document sides are not from the same document.
* If null, default value will be used.
*/
this.sidesNotMatchingTitle = null;
/**
* String: message inside dialog, which is shown when scanned document sides are not from the same document.
* If null, default value will be used.
*/
this.sidesNotMatchingMessage = null;
/**
* String: title of the dialog, which is shown when unsupported document is scanned.
* If null, default value will be used.
*/
this.unsupportedDocumentTitle = null;
/**
* String: message inside dialog, which is shown when unsupported document is scanned.
* If null, default value will be used.
*/
this.unsupportedDocumentMessage = null;
/**
* String: title of the dialog, which is shown on timeout when scanning is stuck on the back document side.
* If null, default value will be used.
*/
this.recognitionTimeoutTitle = null;
/**
* String: message inside dialog, which is shown on timeout when scanning is stuck on the back document side.
* If null, default value will be used.
*/
this.recognitionTimeoutMessage = null;
/**
* String: text of the "retry" button inside dialog, which is shown on timeout when scanning is stuck on the back
* document side.
*/
this.retryButtonText = null;

/**
* If true, BlinkIdCombinedRecognizer will check if sides do match when scanning is finished
* Default: true
*/
this.requireDocumentSidesDataMatch = true;

/**
* Defines whether Document Not Supported dialog will be displayed in UI.
*
* Default: true
*/
this.showNotSupportedDialog = true;

/**
* Option to configure back side scanning timeout.
*
* Default: 17000
*/
this.backSideScanningTimeoutMilliseconds = 17000;

}
}

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.2.0",
"version": "5.3.0",
"description": "A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).",
"main": "index.js",
"repository": {
Expand Down
66 changes: 43 additions & 23 deletions BlinkID/recognizers/blinkIdCombinedRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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 Down Expand Up @@ -48,18 +48,23 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
*/
this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null;

/**
* Determines if date of expiry is permanent.
*/
this.dateOfExpiryPermanent = nativeResult.dateOfExpiryPermanent;

/**
* The date of issue of the document.
*/
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 @@ -72,7 +77,7 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
* 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;

Expand All @@ -92,7 +97,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 @@ -102,12 +107,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 @@ -137,7 +142,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 @@ -178,7 +183,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 @@ -199,53 +204,68 @@ 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();

/**
* 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;

Expand Down
52 changes: 36 additions & 16 deletions BlinkID/recognizers/blinkIdRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class BlinkIdRecognizerResult 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 Down Expand Up @@ -48,6 +48,11 @@ export class BlinkIdRecognizerResult extends RecognizerResult {
*/
this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null;

/**
* Determines if date of expiry is permanent.
*/
this.dateOfExpiryPermanent = nativeResult.dateOfExpiryPermanent;

/**
* The date of issue of the document.
*/
Expand All @@ -74,7 +79,7 @@ export class BlinkIdRecognizerResult 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 @@ -84,7 +89,7 @@ export class BlinkIdRecognizerResult extends RecognizerResult {
this.firstName = nativeResult.firstName;

/**
* full document image if enabled with returnFullDocumentImage property.
* full document image if enabled with returnFullDocumentImage property.
*/
this.fullDocumentImage = nativeResult.fullDocumentImage;

Expand Down Expand Up @@ -114,7 +119,7 @@ export class BlinkIdRecognizerResult 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 @@ -170,46 +175,61 @@ export class BlinkIdRecognizer 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();

/**
* 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;

Expand Down
Loading

0 comments on commit 5d0601a

Please sign in to comment.