Skip to content

Commit

Permalink
Merge pull request #109 from BlinkID/release/v4.10.0
Browse files Browse the repository at this point in the history
Release/v4.10.0
  • Loading branch information
juraskrlec authored Jul 17, 2019
2 parents 53c5580 + f9a71d5 commit 9e15cfb
Show file tree
Hide file tree
Showing 125 changed files with 1,148 additions and 202 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": "4.9.0",
"version": "4.10.0",
"description": "A small and powerful ID card scanning library",
"cordova": {
"id": "blinkid-cordova",
Expand Down
14 changes: 13 additions & 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="4.9.0">
version="4.10.0">

<name>BlinkIdScanner</name>
<description>A small and powerful ID card scanning library</description>
Expand Down Expand Up @@ -62,6 +62,7 @@
<source-file src="src/android/java/com/phonegap/plugins/microblink/overlays/OverlaySettingsSerializers.java" target-dir="src/com/phonegap/plugins/microblink/overlays" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BlinkCardOverlaySettingsSerialization.java" target-dir="src/com/phonegap/plugins/microblink/overlays/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/overlays/serialization/DocumentVerificationOverlaySettingsSerialization.java" target-dir="src/com/phonegap/plugins/microblink/overlays/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BlinkIdOverlaySettingsSerialization.java" target-dir="src/com/phonegap/plugins/microblink/overlays/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/overlays/serialization/DocumentOverlaySettingsSerialization.java" target-dir="src/com/phonegap/plugins/microblink/overlays/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BarcodeOverlaySettingsSerialization.java" target-dir="src/com/phonegap/plugins/microblink/overlays/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerializers.java" target-dir="src/com/phonegap/plugins/microblink/recognizers" />
Expand Down Expand Up @@ -123,6 +124,7 @@
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IrelandDlFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdBackRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/HongKongIdFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdBackRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdBackRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
Expand All @@ -135,6 +137,7 @@
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ItalyDlFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdOldRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaCombinedRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeDlFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
Expand All @@ -156,6 +159,7 @@
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IndonesiaIdFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwedenDlFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NigeriaVoterIdBackRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdBackRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdBackRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
<source-file src="src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NewZealandDlFrontRecognizerSerialization.java" target-dir="src/com/phonegap/plugins/microblink/recognizers/serialization" />
Expand Down Expand Up @@ -187,11 +191,13 @@
<header-file src="src/ios/sources/Overlays/Serialization/MBDocumentOverlaySettingsSerialization.h" />
<header-file src="src/ios/sources/Overlays/Serialization/MBBarcodeOverlaySettingsSerialization.h" />
<source-file src="src/ios/sources/Overlays/Serialization/MBDocumentVerificationOverlaySettingsSerialization.m" />
<source-file src="src/ios/sources/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.m" />
<header-file src="src/ios/sources/Overlays/Serialization/MBBlinkCardOverlaySettingsSerialization.h" />
<source-file src="src/ios/sources/Overlays/Serialization/MBDocumentOverlaySettingsSerialization.m" />
<header-file src="src/ios/sources/Overlays/Serialization/MBDocumentVerificationOverlaySettingsSerialization.h" />
<source-file src="src/ios/sources/Overlays/Serialization/MBBarcodeOverlaySettingsSerialization.m" />
<source-file src="src/ios/sources/Overlays/Serialization/MBBlinkCardOverlaySettingsSerialization.m" />
<header-file src="src/ios/sources/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.h" />
<header-file src="src/ios/sources/Recognizers/MBRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/MBRecognizerSerializers.h" />
<source-file src="src/ios/sources/Recognizers/MBRecognizerWrapper.m" />
Expand All @@ -203,6 +209,7 @@
<source-file src="src/ios/sources/Recognizers/Wrappers/MBNewZealandDlFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSlovakiaCombinedRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBCzechiaIdBackRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitBackRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSwedenDlFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBGermanyIdBackRecognizerWrapper.m" />
Expand Down Expand Up @@ -247,6 +254,7 @@
<source-file src="src/ios/sources/Recognizers/Wrappers/MBAustriaDlFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBJordanIdBackRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBBarcodeRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBCroatiaIdFrontRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSuccessFrameGrabberRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBMrtdRecognizerWrapper.m" />
Expand Down Expand Up @@ -290,6 +298,7 @@
<source-file src="src/ios/sources/Recognizers/Wrappers/MBMoroccoIdBackRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBHongKongIdFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdFrontRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBGermanyDlBackRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSwitzerlandIdFrontRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBAustraliaDlFrontRecognizerWrapper.h" />
Expand All @@ -303,6 +312,7 @@
<header-file src="src/ios/sources/Recognizers/Wrappers/MBGermanyIdBackRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBBruneiTemporaryResidencePermitBackRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSwedenDlFrontRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBSlovakiaCombinedRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBCzechiaIdBackRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBNewZealandDlFrontRecognizerWrapper.h" />
Expand Down Expand Up @@ -358,13 +368,15 @@
<source-file src="src/ios/sources/Recognizers/Wrappers/MBCyprusIdFrontRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBColombiaIdBackRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBMalaysiaDlFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBSuccessFrameGrabberRecognizerWrapper.m" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBCroatiaIdFrontRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBMrtdRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBBarcodeRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBJordanIdBackRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBAustriaDlFrontRecognizerWrapper.h" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBBlinkCardEliteRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBBruneiMilitaryIdFrontRecognizerWrapper.h" />
<source-file src="src/ios/sources/Recognizers/Wrappers/MBHongKongIdFrontRecognizerWrapper.m" />
<header-file src="src/ios/sources/Recognizers/Wrappers/MBMoroccoIdBackRecognizerWrapper.h" />
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/v4.9.0/blinkid-ios_v4.9.0.zip'
LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v4.10.0/blinkid-ios_v4.10.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 @@ -24,6 +24,7 @@ private void registerMapping(OverlaySettingsSerialization overlaySettingsSeriali
registerMapping(new DocumentOverlaySettingsSerialization());
registerMapping(new DocumentVerificationOverlaySettingsSerialization());
registerMapping(new BlinkCardOverlaySettingsSerialization());
registerMapping(new BlinkIdOverlaySettingsSerialization());
}

public UISettings getOverlaySettings(JSONObject jsonOverlaySettings, RecognizerBundle recognizerBundle) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.phonegap.plugins.microblink.overlays.serialization;

import com.microblink.entities.recognizers.RecognizerBundle;
import com.microblink.uisettings.BlinkIdUISettings;
import com.microblink.uisettings.UISettings;
import com.phonegap.plugins.microblink.overlays.OverlaySettingsSerialization;

import org.json.JSONObject;

public final class BlinkIdOverlaySettingsSerialization implements OverlaySettingsSerialization {
@Override
public UISettings createUISettings(JSONObject jsonUISettings, RecognizerBundle recognizerBundle) {
// no settings deserialized at the moment
return new BlinkIdUISettings(recognizerBundle);
}

@Override
public String getJsonName() {
return "BlinkIdOverlaySettings";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import org.json.JSONObject;

public interface RecognizerSerialization {
Recognizer<?, ?> createRecognizer(JSONObject jsonRecognizer);
JSONObject serializeResult(Recognizer<?, ?> recognizer);
Recognizer<?> createRecognizer(JSONObject jsonRecognizer);
JSONObject serializeResult(Recognizer<?> recognizer);

String getJsonName();
Class<?> getRecognizerClass();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ private void registerMapping( RecognizerSerialization recognizerSerialization )
registerMapping(new BarcodeRecognizerSerialization());
registerMapping(new BlinkCardEliteRecognizerSerialization());
registerMapping(new BlinkCardRecognizerSerialization());
registerMapping(new BlinkIdCombinedRecognizerSerialization());
registerMapping(new BlinkIdRecognizerSerialization());
registerMapping(new BruneiIdBackRecognizerSerialization());
registerMapping(new BruneiIdFrontRecognizerSerialization());
registerMapping(new BruneiMilitaryIdBackRecognizerSerialization());
Expand Down Expand Up @@ -86,6 +88,7 @@ private void registerMapping( RecognizerSerialization recognizerSerialization )
registerMapping(new MrtdCombinedRecognizerSerialization());
registerMapping(new MrtdRecognizerSerialization());
registerMapping(new NewZealandDlFrontRecognizerSerialization());
registerMapping(new NigeriaVoterIdBackRecognizerSerialization());
registerMapping(new PassportRecognizerSerialization());
registerMapping(new Pdf417RecognizerSerialization());
registerMapping(new PolandCombinedRecognizerSerialization());
Expand Down Expand Up @@ -123,15 +126,15 @@ public RecognizerSerialization getRecognizerSerialization(JSONObject jsonRecogni
return mByJSONName.get(jsonRecognizer.getString("recognizerType"));
}

public RecognizerSerialization getRecognizerSerialization(Recognizer<?,?> recognizer) {
public RecognizerSerialization getRecognizerSerialization(Recognizer<?> recognizer) {
return mByClass.get(recognizer.getClass());
}

public RecognizerBundle deserializeRecognizerCollection(JSONObject jsonRecognizerCollection) {
try {
JSONArray recognizerArray = jsonRecognizerCollection.getJSONArray("recognizerArray");
int numRecognizers = recognizerArray.length();
Recognizer<?,?>[] recognizers = new Recognizer[numRecognizers];
Recognizer<?>[] recognizers = new Recognizer[numRecognizers];
for (int i = 0; i < numRecognizers; ++i) {
recognizers[ i ] = getRecognizerSerialization(recognizerArray.getJSONObject(i)).createRecognizer(recognizerArray.getJSONObject(i));
}
Expand All @@ -145,10 +148,10 @@ public RecognizerBundle deserializeRecognizerCollection(JSONObject jsonRecognize
}
}

public JSONArray serializeRecognizerResults(Recognizer<?,?>[] recognizers) {
public JSONArray serializeRecognizerResults(Recognizer<?>[] recognizers) {
JSONArray jsonArray = new JSONArray();

for (Recognizer<?, ?> recognizer : recognizers) {
for (Recognizer<?> recognizer : recognizers) {
jsonArray.put(getRecognizerSerialization(recognizer).serializeResult(recognizer));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public final class AustraliaDlBackRecognizerSerialization implements RecognizerSerialization {

@Override
public Recognizer<?, ?> createRecognizer(JSONObject jsonRecognizer) {
public Recognizer<?> createRecognizer(JSONObject jsonRecognizer) {
com.microblink.entities.recognizers.blinkid.australia.AustraliaDlBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.australia.AustraliaDlBackRecognizer();
recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true));
recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true));
Expand All @@ -23,7 +23,7 @@ public final class AustraliaDlBackRecognizerSerialization implements RecognizerS
}

@Override
public JSONObject serializeResult(Recognizer<?, ?> recognizer) {
public JSONObject serializeResult(Recognizer<?> recognizer) {
com.microblink.entities.recognizers.blinkid.australia.AustraliaDlBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.australia.AustraliaDlBackRecognizer)recognizer).getResult();
JSONObject jsonResult = new JSONObject();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public final class AustraliaDlFrontRecognizerSerialization implements RecognizerSerialization {

@Override
public Recognizer<?, ?> createRecognizer(JSONObject jsonRecognizer) {
public Recognizer<?> createRecognizer(JSONObject jsonRecognizer) {
com.microblink.entities.recognizers.blinkid.australia.AustraliaDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.australia.AustraliaDlFrontRecognizer();
recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true));
recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true));
Expand All @@ -27,7 +27,7 @@ public final class AustraliaDlFrontRecognizerSerialization implements Recognizer
}

@Override
public JSONObject serializeResult(Recognizer<?, ?> recognizer) {
public JSONObject serializeResult(Recognizer<?> recognizer) {
com.microblink.entities.recognizers.blinkid.australia.AustraliaDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.australia.AustraliaDlFrontRecognizer)recognizer).getResult();
JSONObject jsonResult = new JSONObject();
try {
Expand Down
Loading

0 comments on commit 9e15cfb

Please sign in to comment.