Skip to content

Commit

Permalink
Merge pull request #139 from BlinkID/release/5.2.0
Browse files Browse the repository at this point in the history
Release/5.2.0
  • Loading branch information
juraskrlec authored Feb 6, 2020
2 parents 60fd081 + 01157eb commit aefa8f0
Show file tree
Hide file tree
Showing 15 changed files with 268 additions and 202 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.1.0'
s.dependency 'PPBlinkID', '~> 5.2.0'

s.frameworks = 'UIKit'
end
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.1.0",
"version": "5.2.0",
"description": "A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).",
"main": "index.js",
"repository": {
Expand Down
27 changes: 26 additions & 1 deletion BlinkID/recognizers/blinkIdCombinedRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ 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.
*/
this.digitalSignature = nativeResult.digitalSignature;

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

/**
* The additional number of the document.
*/
Expand Down Expand Up @@ -116,6 +126,11 @@ export class BlinkIdCombinedRecognizerResult extends RecognizerResult {
*/
this.lastName = nativeResult.lastName;

/**
* The localized name of the document owner.
*/
this.localizedName = nativeResult.localizedName;

/**
* The marital status of the document owner.
*/
Expand Down Expand Up @@ -184,13 +199,16 @@ export class BlinkIdCombinedRecognizer extends Recognizer {

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

/**
* The DPI (Dots Per Inch) for face image that should be returned.
* Property for setting DPI for face images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*/
this.faceImageDpi = 250;

Expand Down Expand Up @@ -224,6 +242,13 @@ export class BlinkIdCombinedRecognizer extends Recognizer {
*/
this.returnFullDocumentImage = false;

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

this.createResultFromNative = function (nativeResult) { return new BlinkIdCombinedRecognizerResult(nativeResult); }
}
}
10 changes: 9 additions & 1 deletion BlinkID/recognizers/blinkIdRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ export class BlinkIdRecognizerResult extends RecognizerResult {
*/
this.lastName = nativeResult.lastName;

/**
* The localized name of the document owner.
*/
this.localizedName = nativeResult.localizedName;

/**
* The marital status of the document owner.
*/
Expand Down Expand Up @@ -165,13 +170,16 @@ export class BlinkIdRecognizer extends Recognizer {

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

/**
* The DPI (Dots Per Inch) for face image that should be returned.
* Property for setting DPI for face images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
*
*
*/
this.faceImageDpi = 250;

Expand Down
7 changes: 7 additions & 0 deletions BlinkID/recognizers/passportRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ export class PassportRecognizer extends Recognizer {
constructor() {
super('PassportRecognizer');

/**
* Defines whether to anonymize Netherlands MRZ
*
*
*/
this.anonymizeNetherlandsMrz = true;

/**
* Defines if glare detection should be turned on/off.
*
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation('com.microblink:blinkid:5.1.0@aar') {
implementation('com.microblink:blinkid:5.2.0@aar') {
transitive = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public Recognizer<?> createRecognizer(ReadableMap jsonRecognizer) {
if (jsonRecognizer.hasKey("returnFullDocumentImage")) {
recognizer.setReturnFullDocumentImage(jsonRecognizer.getBoolean("returnFullDocumentImage"));
}
if (jsonRecognizer.hasKey("signResult")) {
recognizer.setSignResult(jsonRecognizer.getBoolean("signResult"));
}
return recognizer;
}

Expand All @@ -43,6 +46,8 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putMap("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth()));
jsonResult.putMap("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry()));
jsonResult.putMap("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue()));
jsonResult.putString("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature()));
jsonResult.putInt("digitalSignatureVersion", (int)result.getDigitalSignatureVersion());
jsonResult.putString("documentAdditionalNumber", result.getDocumentAdditionalNumber());
jsonResult.putInt("documentDataMatch", SerializationUtils.serializeEnum(result.getDocumentDataMatch()));
jsonResult.putString("documentNumber", result.getDocumentNumber());
Expand All @@ -55,6 +60,7 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putString("fullName", result.getFullName());
jsonResult.putString("issuingAuthority", result.getIssuingAuthority());
jsonResult.putString("lastName", result.getLastName());
jsonResult.putString("localizedName", result.getLocalizedName());
jsonResult.putString("maritalStatus", result.getMaritalStatus());
jsonResult.putMap("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult()));
jsonResult.putString("nationality", result.getNationality());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putString("fullName", result.getFullName());
jsonResult.putString("issuingAuthority", result.getIssuingAuthority());
jsonResult.putString("lastName", result.getLastName());
jsonResult.putString("localizedName", result.getLocalizedName());
jsonResult.putString("maritalStatus", result.getMaritalStatus());
jsonResult.putMap("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult()));
jsonResult.putString("nationality", result.getNationality());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public final class PassportRecognizerSerialization implements RecognizerSerializ
@Override
public Recognizer<?> createRecognizer(ReadableMap jsonRecognizer) {
com.microblink.entities.recognizers.blinkid.passport.PassportRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.passport.PassportRecognizer();
if (jsonRecognizer.hasKey("anonymizeNetherlandsMrz")) {
recognizer.setAnonymizeNetherlandsMrz(jsonRecognizer.getBoolean("anonymizeNetherlandsMrz"));
}
if (jsonRecognizer.hasKey("detectGlare")) {
recognizer.setDetectGlare(jsonRecognizer.getBoolean("detectGlare"));
}
Expand Down
Loading

0 comments on commit aefa8f0

Please sign in to comment.