Skip to content

Commit

Permalink
Merge pull request #138 from BlinkID/release/5.9.0
Browse files Browse the repository at this point in the history
Release/5.9.0
  • Loading branch information
juraskrlec authored Dec 16, 2020
2 parents c4fbe85 + 7836563 commit e47fcc7
Show file tree
Hide file tree
Showing 19 changed files with 92 additions and 41 deletions.
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-cordova",
"version": "5.8.1",
"version": "5.9.0",
"description": "A small and powerful ID card scanning library",
"cordova": {
"id": "blinkid-cordova",
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="blinkid-cordova"
version="5.8.1">
version="5.9.0">

<name>BlinkIdScanner</name>
<description>A small and powerful ID card scanning library</description>
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/scripts/initIOSFramework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
HERE="$(dirname "$(test -L "$0" && readlink "$0" || echo "$0")")"
pushd "${HERE}/../src/ios/" > /dev/null

LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v5.8.0/blinkid-ios_v5.8.0.zip'
LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v5.9.0/blinkid-ios_v5.9.0.zip'
FILENAME='blinkid-ios.zip'

# check if Microblink framework and bundle already exist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import android.util.Base64;

import com.microblink.entities.recognizers.Recognizer;
//import com.microblink.entities.parsers.Parser;
import com.microblink.geometry.Point;
import com.microblink.geometry.Quadrilateral;
import com.microblink.image.Image;
Expand All @@ -30,10 +29,6 @@ public static <T extends Recognizer.Result> void addCommonRecognizerResultData(J
jsonObject.put("resultState", serializeEnum(result.getResultState()));
}

/*public static <T extends Parser.Result> void addCommonParserResultData(JSONObject jsonObject, T result) throws JSONException {
jsonObject.put("resultState", serializeEnum(result.getResultState()));
}*/

public static JSONObject serializeDate( @Nullable Date date ) throws JSONException {
if (date != null ) {
JSONObject jsonDate = new JSONObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public JSONObject serializeResult(Recognizer<?> recognizer) {
jsonResult.put("documentAdditionalNumber", result.getDocumentAdditionalNumber());
jsonResult.put("documentDataMatch", SerializationUtils.serializeEnum(result.getDocumentDataMatch()));
jsonResult.put("documentNumber", result.getDocumentNumber());
jsonResult.put("documentOptionalAdditionalNumber", result.getDocumentOptionalAdditionalNumber());
jsonResult.put("driverLicenseDetailedInfo", BlinkIDSerializationUtils.serializeDriverLicenseDetailedInfo(result.getDriverLicenseDetailedInfo()));
jsonResult.put("employer", result.getEmployer());
jsonResult.put("expired", result.isExpired());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public JSONObject serializeResult(Recognizer<?> recognizer) {
jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue()));
jsonResult.put("documentAdditionalNumber", result.getDocumentAdditionalNumber());
jsonResult.put("documentNumber", result.getDocumentNumber());
jsonResult.put("documentOptionalAdditionalNumber", result.getDocumentOptionalAdditionalNumber());
jsonResult.put("driverLicenseDetailedInfo", BlinkIDSerializationUtils.serializeDriverLicenseDetailedInfo(result.getDriverLicenseDetailedInfo()));
jsonResult.put("employer", result.getEmployer());
jsonResult.put("expired", result.isExpired());
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/src/android/libBlinkID.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repositories {
}

dependencies {
implementation('com.microblink:blinkid:5.8.0@aar') {
implementation('com.microblink:blinkid:5.9.0@aar') {
transitive = true
}
}
Expand Down
9 changes: 7 additions & 2 deletions BlinkID/src/ios/sources/CDVMicroblinkScanner.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,16 @@ - (void)setLicense:(NSDictionary*) jsonLicense {
NSString* iosLicense = [jsonLicense objectForKey:@"ios"];
if ([jsonLicense objectForKey:@"licensee"] != nil) {
NSString *licensee = [jsonLicense objectForKey:@"licensee"];
[[MBMicroblinkSDK sharedInstance] setLicenseKey:iosLicense andLicensee:licensee errorCallback: nil];
[[MBMicroblinkSDK sharedInstance] setLicenseKey:iosLicense andLicensee:licensee errorCallback:^(MBLicenseError licenseError) {

}];
}
else {
[[MBMicroblinkSDK sharedInstance] setLicenseKey:iosLicense errorCallback: nil];
[[MBMicroblinkSDK sharedInstance] setLicenseKey:iosLicense errorCallback:^(MBLicenseError licenseError) {

}];
}

}

- (void)overlayViewControllerDidFinishScanning:(MBOverlayViewController *)overlayViewController state:(MBRecognizerResultState)state {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue];
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi integerValue];
}
}
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi integerValue];
}
}
{
Expand Down Expand Up @@ -98,7 +98,7 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"];
if (signatureImageDpi != nil) {
recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue];
recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi integerValue];
}
}
{
Expand Down Expand Up @@ -139,10 +139,11 @@ -(NSDictionary *) serializeResult {
[jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"];
[jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"];
[jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"];
[jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"];
[jsonResult setValue:[NSNumber numberWithInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"];
[jsonResult setValue:self.result.documentAdditionalNumber forKey:@"documentAdditionalNumber"];
[jsonResult setValue:[NSNumber numberWithInteger:(self.result.documentDataMatch + 1)] forKey:@"documentDataMatch"];
[jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"];
[jsonResult setValue:self.result.documentOptionalAdditionalNumber forKey:@"documentOptionalAdditionalNumber"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeDriverLicenseDetailedInfo:self.result.driverLicenseDetailedInfo] forKey:@"driverLicenseDetailedInfo"];
[jsonResult setValue:self.result.employer forKey:@"employer"];
[jsonResult setValue:[NSNumber numberWithBool:self.result.expired] forKey:@"expired"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue];
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi integerValue];
}
}
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi integerValue];
}
}
{
Expand Down Expand Up @@ -92,7 +92,7 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"];
if (signatureImageDpi != nil) {
recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi unsignedIntegerValue];
recognizer.signatureImageDpi = [(NSNumber *)signatureImageDpi integerValue];
}
}
{
Expand Down Expand Up @@ -126,6 +126,7 @@ -(NSDictionary *) serializeResult {
[jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"];
[jsonResult setValue:self.result.documentAdditionalNumber forKey:@"documentAdditionalNumber"];
[jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"];
[jsonResult setValue:self.result.documentOptionalAdditionalNumber forKey:@"documentOptionalAdditionalNumber"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeDriverLicenseDetailedInfo:self.result.driverLicenseDetailedInfo] forKey:@"driverLicenseDetailedInfo"];
[jsonResult setValue:self.result.employer forKey:@"employer"];
[jsonResult setValue:[NSNumber numberWithBool:self.result.expired] forKey:@"expired"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue];
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi integerValue];
}
}
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi integerValue];
}
}
{
Expand All @@ -44,7 +44,7 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id numStableDetectionsThreshold = [jsonRecognizer valueForKey:@"numStableDetectionsThreshold"];
if (numStableDetectionsThreshold != nil) {
recognizer.numStableDetectionsThreshold = [(NSNumber *)numStableDetectionsThreshold unsignedIntegerValue];
recognizer.numStableDetectionsThreshold = [(NSNumber *)numStableDetectionsThreshold integerValue];
}
}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue];
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi integerValue];
}
}
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi integerValue];
}
}
{
Expand All @@ -62,7 +62,7 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id numStableDetectionsThreshold = [jsonRecognizer valueForKey:@"numStableDetectionsThreshold"];
if (numStableDetectionsThreshold != nil) {
recognizer.numStableDetectionsThreshold = [(NSNumber *)numStableDetectionsThreshold unsignedIntegerValue];
recognizer.numStableDetectionsThreshold = [(NSNumber *)numStableDetectionsThreshold integerValue];
}
}
{
Expand Down Expand Up @@ -97,7 +97,7 @@ @implementation MBMrtdCombinedRecognizer (JsonSerialization)
-(NSDictionary *) serializeResult {
NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult];
[jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"];
[jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"];
[jsonResult setValue:[NSNumber numberWithInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"];
[jsonResult setValue:[NSNumber numberWithInteger:(self.result.documentDataMatch + 1)] forKey:@"documentDataMatch"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentBackImage] forKey:@"fullDocumentBackImage"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi integerValue];
}
}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue];
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi integerValue];
}
}
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi integerValue];
}
}
{
Expand Down Expand Up @@ -79,7 +79,7 @@ @implementation MBPassportRecognizer (JsonSerialization)
-(NSDictionary *) serializeResult {
NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult];
[jsonResult setValue:[self.result.digitalSignature base64EncodedStringWithOptions:0] forKey:@"digitalSignature"];
[jsonResult setValue:[NSNumber numberWithUnsignedInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"];
[jsonResult setValue:[NSNumber numberWithInteger:self.result.digitalSignatureVersion] forKey:@"digitalSignatureVersion"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"];
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue];
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi integerValue];
}
}
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi integerValue];
}
}
{
Expand All @@ -49,7 +49,7 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id numStableDetectionsThreshold = [jsonRecognizer valueForKey:@"numStableDetectionsThreshold"];
if (numStableDetectionsThreshold != nil) {
recognizer.numStableDetectionsThreshold = [(NSNumber *)numStableDetectionsThreshold unsignedIntegerValue];
recognizer.numStableDetectionsThreshold = [(NSNumber *)numStableDetectionsThreshold integerValue];
}
}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue];
recognizer.faceImageDpi = [(NSNumber *)faceImageDpi integerValue];
}
}
{
id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"];
if (fullDocumentImageDpi != nil) {
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue];
recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi integerValue];
}
}
{
Expand Down
Loading

0 comments on commit e47fcc7

Please sign in to comment.