Skip to content

Commit

Permalink
Merge pull request #223 from BlinkID/release/v6.11.0
Browse files Browse the repository at this point in the history
Release/v6.11.0
  • Loading branch information
mparadina authored Oct 14, 2024
2 parents e4776ec + 9a98ff8 commit cb8dee7
Show file tree
Hide file tree
Showing 18 changed files with 369 additions and 218 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', '~> 6.10.1'
s.dependency 'PPBlinkID', '~> 6.11.0'

s.frameworks = 'UIKit'
end
2 changes: 1 addition & 1 deletion BlinkID/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class RecognizerCollection {
*/
this.allowMultipleResults = false;
/** Number of miliseconds after first non-empty result becomes available to end scanning with a timeout */
this.milisecondsBeforeTimeout = 10000;
this.milisecondsBeforeTimeout = 0;

if (!(this.recognizerArray instanceof Array)) {
throw new Error("recognizerArray must be array of Recognizer objects!");
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": "6.10.0",
"version": "6.11.0",
"description": "A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).",
"main": "index.js",
"repository": {
Expand Down
25 changes: 25 additions & 0 deletions BlinkID/recognizers/blinkIdMultiSideRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ export class BlinkIdMultiSideRecognizerResult extends RecognizerResult {
*/
this.driverLicenseDetailedInfo = nativeResult.driverLicenseDetailedInfo;

/**
* The manufacturing year..
*/
this.eligibilityCategory = nativeResult.eligibilityCategory;

/**
* The employer of the document owner.
*/
Expand Down Expand Up @@ -263,6 +268,11 @@ export class BlinkIdMultiSideRecognizerResult extends RecognizerResult {
*/
this.localizedName = nativeResult.localizedName;

/**
* The manufacturing year.
*/
this.manufacturingYear = nativeResult.manufacturingYear;

/**
* The marital status of the document owner.
*/
Expand Down Expand Up @@ -349,16 +359,31 @@ export class BlinkIdMultiSideRecognizerResult extends RecognizerResult {
*/
this.signatureImage = nativeResult.signatureImage;

/**
* The specific document validity.
*/
this.specificDocumentValidity = nativeResult.specificDocumentValidity;

/**
* The sponsor of the document owner.
*/
this.sponsor = nativeResult.sponsor;

/**
* The eligibility category.
*/
this.vehicleType = nativeResult.vehicleType;

/**
* The visa type.
*/
this.visaType = nativeResult.visaType;

/**
* The dependents info.
*/
this.dependentsInfo = nativeResult.dependentsInfo;

}
}

Expand Down
25 changes: 25 additions & 0 deletions BlinkID/recognizers/blinkIdSingleSideRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ export class BlinkIdSingleSideRecognizerResult extends RecognizerResult {
*/
this.driverLicenseDetailedInfo = nativeResult.driverLicenseDetailedInfo;

/**
* The manufacturing year..
*/
this.eligibilityCategory = nativeResult.eligibilityCategory;

/**
* The employer of the document owner.
*/
Expand Down Expand Up @@ -210,6 +215,11 @@ export class BlinkIdSingleSideRecognizerResult extends RecognizerResult {
*/
this.localizedName = nativeResult.localizedName;

/**
* The manufacturing year.
*/
this.manufacturingYear = nativeResult.manufacturingYear;

/**
* The marital status of the document owner.
*/
Expand Down Expand Up @@ -290,11 +300,21 @@ export class BlinkIdSingleSideRecognizerResult extends RecognizerResult {
*/
this.signatureImage = nativeResult.signatureImage;

/**
* The specific document validity.
*/
this.specificDocumentValidity = nativeResult.specificDocumentValidity;

/**
* The sponsor of the document owner.
*/
this.sponsor = nativeResult.sponsor;

/**
* The eligibility category.
*/
this.vehicleType = nativeResult.vehicleType;

/**
* The visa type.
*/
Expand All @@ -305,6 +325,11 @@ export class BlinkIdSingleSideRecognizerResult extends RecognizerResult {
*/
this.vizResult = nativeResult.vizResult;

/**
* The dependents info.
*/
this.dependentsInfo = nativeResult.dependentsInfo;

}
}

Expand Down
4 changes: 2 additions & 2 deletions BlinkID/src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
compileSdkVersion 34

defaultConfig {
minSdkVersion 21
minSdkVersion 23
targetSdkVersion 34
}
buildTypes {
Expand All @@ -25,7 +25,7 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation('com.microblink:blinkid:6.10.0@aar') {
implementation('com.microblink:blinkid:6.11.1@aar') {
transitive = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import com.microblink.blinkid.entities.recognizers.blinkid.generic.DocumentNumberAnonymizationSettings;
import com.microblink.blinkid.entities.recognizers.blinkid.generic.CustomClassRules;
import com.microblink.blinkid.entities.recognizers.blinkid.generic.DetailedFieldType;
import com.microblink.blinkid.entities.recognizers.blinkid.generic.DependentInfo;

public abstract class BlinkIDSerializationUtils {
public static WritableMap serializeMrzResult(MrzResult mrzResult) {
Expand Down Expand Up @@ -150,18 +151,21 @@ public static WritableMap serializeStringResult(StringResult stringResult) {
jsonStringResult.putString("latin", stringResult.value(AlphabetType.Latin));
jsonStringResult.putString("arabic", stringResult.value(AlphabetType.Arabic));
jsonStringResult.putString("cyrillic", stringResult.value(AlphabetType.Cyrillic));
jsonStringResult.putString("greek", stringResult.value(AlphabetType.Greek));
jsonStringResult.putString("description", stringResult.toString());

WritableMap jsonFieldLocations = new WritableNativeMap();
jsonFieldLocations.putMap("latin",SerializationUtils.serializeRectangle(stringResult.location(AlphabetType.Latin)));
jsonFieldLocations.putMap("arabic",SerializationUtils.serializeRectangle(stringResult.location(AlphabetType.Arabic)));
jsonFieldLocations.putMap("cyrillic",SerializationUtils.serializeRectangle(stringResult.location(AlphabetType.Cyrillic)));
jsonFieldLocations.putMap("greek",SerializationUtils.serializeRectangle(stringResult.location(AlphabetType.Greek)));
jsonStringResult.putMap("location", jsonFieldLocations);

WritableMap jsonDocumentSides = new WritableNativeMap();
jsonDocumentSides.putInt("latin",serializeSide(stringResult.side(AlphabetType.Latin)));
jsonDocumentSides.putInt("arabic",serializeSide(stringResult.side(AlphabetType.Arabic)));
jsonDocumentSides.putInt("cyrillic",serializeSide(stringResult.side(AlphabetType.Cyrillic)));
jsonDocumentSides.putInt("greek",serializeSide(stringResult.side(AlphabetType.Greek)));
jsonStringResult.putMap("side", jsonDocumentSides);
}
return jsonStringResult;
Expand Down Expand Up @@ -434,4 +438,18 @@ public static CustomClassRules[] deserializeCustomClassRules(ReadableArray jsonA
return new CustomClassRules[]{};
}
}

public static WritableArray serializeDependentInfo (DependentInfo[] dependentInfos) {
WritableArray jsonDependentInfos = new WritableNativeArray();
for (int i = 0; i < dependentInfos.length; ++i) {
WritableMap jsonDependetsInfo = new WritableNativeMap();
jsonDependetsInfo.putMap("dateOfBirth", BlinkIDSerializationUtils.serializeDateResult(dependentInfos[i].getDateOfBirth()));
jsonDependetsInfo.putMap("documentNumber",BlinkIDSerializationUtils.serializeStringResult(dependentInfos[i].getDocumentNumber()));
jsonDependetsInfo.putMap("sex",BlinkIDSerializationUtils.serializeStringResult(dependentInfos[i].getSex()));
jsonDependetsInfo.putMap("fullName",BlinkIDSerializationUtils.serializeStringResult(dependentInfos[i].getFullName()));
jsonDependetsInfo.putBoolean("empty", dependentInfos[i].isEmpty());
jsonDependentInfos.pushMap(jsonDependetsInfo);
}
return jsonDependentInfos;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,13 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putMap("dateOfExpiry", BlinkIDSerializationUtils.serializeDateResult(result.getDateOfExpiry()));
jsonResult.putBoolean("dateOfExpiryPermanent", result.isDateOfExpiryPermanent());
jsonResult.putMap("dateOfIssue", BlinkIDSerializationUtils.serializeDateResult(result.getDateOfIssue()));
jsonResult.putArray("dependentsInfo", BlinkIDSerializationUtils.serializeDependentInfo(result.getDependentsInfo()));
jsonResult.putMap("documentAdditionalNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentAdditionalNumber()));
jsonResult.putMap("documentNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentNumber()));
jsonResult.putMap("documentOptionalAdditionalNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentOptionalAdditionalNumber()));
jsonResult.putMap("documentSubtype", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentSubtype()));
jsonResult.putMap("driverLicenseDetailedInfo", BlinkIDSerializationUtils.serializeDriverLicenseDetailedInfo(result.getDriverLicenseDetailedInfo()));
jsonResult.putMap("eligibilityCategory", BlinkIDSerializationUtils.serializeStringResult(result.getEligibilityCategory()));
jsonResult.putMap("employer", BlinkIDSerializationUtils.serializeStringResult(result.getEmployer()));
jsonResult.putBoolean("expired", result.isExpired());
jsonResult.putString("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage()));
Expand All @@ -140,6 +142,7 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putMap("issuingAuthority", BlinkIDSerializationUtils.serializeStringResult(result.getIssuingAuthority()));
jsonResult.putMap("lastName", BlinkIDSerializationUtils.serializeStringResult(result.getLastName()));
jsonResult.putMap("localizedName", BlinkIDSerializationUtils.serializeStringResult(result.getLocalizedName()));
jsonResult.putMap("manufacturingYear", BlinkIDSerializationUtils.serializeStringResult(result.getManufacturingYear()));
jsonResult.putMap("maritalStatus", BlinkIDSerializationUtils.serializeStringResult(result.getMaritalStatus()));
jsonResult.putMap("mothersName", BlinkIDSerializationUtils.serializeStringResult(result.getMothersName()));
jsonResult.putMap("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult()));
Expand All @@ -157,7 +160,9 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putBoolean("scanningFirstSideDone", result.isScanningFirstSideDone());
jsonResult.putMap("sex", BlinkIDSerializationUtils.serializeStringResult(result.getSex()));
jsonResult.putString("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage()));
jsonResult.putMap("specificDocumentValidity", BlinkIDSerializationUtils.serializeStringResult(result.getSpecificDocumentValidity()));
jsonResult.putMap("sponsor", BlinkIDSerializationUtils.serializeStringResult(result.getSponsor()));
jsonResult.putMap("vehicleType", BlinkIDSerializationUtils.serializeStringResult(result.getVehicleType()));
jsonResult.putMap("visaType", BlinkIDSerializationUtils.serializeStringResult(result.getVisaType()));
return jsonResult;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,13 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putMap("dateOfExpiry", BlinkIDSerializationUtils.serializeDateResult(result.getDateOfExpiry()));
jsonResult.putBoolean("dateOfExpiryPermanent", result.isDateOfExpiryPermanent());
jsonResult.putMap("dateOfIssue", BlinkIDSerializationUtils.serializeDateResult(result.getDateOfIssue()));
jsonResult.putArray("dependentsInfo", BlinkIDSerializationUtils.serializeDependentInfo(result.getDependentsInfo()));
jsonResult.putMap("documentAdditionalNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentAdditionalNumber()));
jsonResult.putMap("documentNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentNumber()));
jsonResult.putMap("documentOptionalAdditionalNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentOptionalAdditionalNumber()));
jsonResult.putMap("documentSubtype", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentSubtype()));
jsonResult.putMap("driverLicenseDetailedInfo", BlinkIDSerializationUtils.serializeDriverLicenseDetailedInfo(result.getDriverLicenseDetailedInfo()));
jsonResult.putMap("eligibilityCategory", BlinkIDSerializationUtils.serializeStringResult(result.getEligibilityCategory()));
jsonResult.putMap("employer", BlinkIDSerializationUtils.serializeStringResult(result.getEmployer()));
jsonResult.putBoolean("expired", result.isExpired());
jsonResult.putString("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage()));
Expand All @@ -122,6 +124,7 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putMap("issuingAuthority", BlinkIDSerializationUtils.serializeStringResult(result.getIssuingAuthority()));
jsonResult.putMap("lastName", BlinkIDSerializationUtils.serializeStringResult(result.getLastName()));
jsonResult.putMap("localizedName", BlinkIDSerializationUtils.serializeStringResult(result.getLocalizedName()));
jsonResult.putMap("manufacturingYear", BlinkIDSerializationUtils.serializeStringResult(result.getManufacturingYear()));
jsonResult.putMap("maritalStatus", BlinkIDSerializationUtils.serializeStringResult(result.getMaritalStatus()));
jsonResult.putMap("mothersName", BlinkIDSerializationUtils.serializeStringResult(result.getMothersName()));
jsonResult.putMap("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult()));
Expand All @@ -138,7 +141,9 @@ public WritableMap serializeResult(Recognizer<?> recognizer) {
jsonResult.putMap("residentialStatus", BlinkIDSerializationUtils.serializeStringResult(result.getResidentialStatus()));
jsonResult.putMap("sex", BlinkIDSerializationUtils.serializeStringResult(result.getSex()));
jsonResult.putString("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage()));
jsonResult.putMap("specificDocumentValidity", BlinkIDSerializationUtils.serializeStringResult(result.getSpecificDocumentValidity()));
jsonResult.putMap("sponsor", BlinkIDSerializationUtils.serializeStringResult(result.getSponsor()));
jsonResult.putMap("vehicleType", BlinkIDSerializationUtils.serializeStringResult(result.getVehicleType()));
jsonResult.putMap("visaType", BlinkIDSerializationUtils.serializeStringResult(result.getVisaType()));
jsonResult.putMap("vizResult", BlinkIDSerializationUtils.serializeVizResult(result.getVizResult()));
return jsonResult;
Expand Down
Loading

0 comments on commit cb8dee7

Please sign in to comment.