diff --git a/BlinkID/package.json b/BlinkID/package.json index ed954d7..c6f83e1 100644 --- a/BlinkID/package.json +++ b/BlinkID/package.json @@ -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", diff --git a/BlinkID/plugin.xml b/BlinkID/plugin.xml index 90d78de..3beaa92 100644 --- a/BlinkID/plugin.xml +++ b/BlinkID/plugin.xml @@ -2,7 +2,7 @@ + version="4.10.0"> BlinkIdScanner A small and powerful ID card scanning library @@ -62,6 +62,7 @@ + @@ -123,6 +124,7 @@ + @@ -135,6 +137,7 @@ + @@ -156,6 +159,7 @@ + @@ -187,11 +191,13 @@ + + @@ -203,6 +209,7 @@ + @@ -247,6 +254,7 @@ + @@ -290,6 +298,7 @@ + @@ -303,6 +312,7 @@ + @@ -358,6 +368,7 @@ + @@ -365,6 +376,7 @@ + diff --git a/BlinkID/scripts/initIOSFramework.sh b/BlinkID/scripts/initIOSFramework.sh index e36ba37..8205df9 100755 --- a/BlinkID/scripts/initIOSFramework.sh +++ b/BlinkID/scripts/initIOSFramework.sh @@ -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 diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/OverlaySettingsSerializers.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/OverlaySettingsSerializers.java index 1da7fc2..b7e596a 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/OverlaySettingsSerializers.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/OverlaySettingsSerializers.java @@ -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) { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BlinkIdOverlaySettingsSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BlinkIdOverlaySettingsSerialization.java new file mode 100644 index 0000000..1a8482a --- /dev/null +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/overlays/serialization/BlinkIdOverlaySettingsSerialization.java @@ -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"; + } +} diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerialization.java index a552694..c81d864 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerialization.java @@ -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(); diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerializers.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerializers.java index c80e0ab..d1ef849 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerializers.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/RecognizerSerializers.java @@ -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()); @@ -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()); @@ -123,7 +126,7 @@ 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()); } @@ -131,7 +134,7 @@ public RecognizerBundle deserializeRecognizerCollection(JSONObject jsonRecognize 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)); } @@ -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)); } diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlBackRecognizerSerialization.java index 1afa805..8d0138f 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlBackRecognizerSerialization.java @@ -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)); @@ -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 { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlFrontRecognizerSerialization.java index 18f800d..ef75ae5 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustraliaDlFrontRecognizerSerialization.java @@ -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)); @@ -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 { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaCombinedRecognizerSerialization.java index 792adb5..39f478c 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaCombinedRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class AustriaCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.austria.AustriaCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.austria.AustriaCombinedRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -37,7 +37,7 @@ public final class AustriaCombinedRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.austria.AustriaCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.austria.AustriaCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaDlFrontRecognizerSerialization.java index fb37658..40dbdea 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class AustriaDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.austria.AustriaDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.austria.AustriaDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -31,7 +31,7 @@ public final class AustriaDlFrontRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.austria.AustriaDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.austria.AustriaDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdBackRecognizerSerialization.java index 475cd34..7769a0c 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class AustriaIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.austria.AustriaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.austria.AustriaIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfIssuance(jsonRecognizer.optBoolean("extractDateOfIssuance", true)); @@ -24,7 +24,7 @@ public final class AustriaIdBackRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.austria.AustriaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.austria.AustriaIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdFrontRecognizerSerialization.java index a8e9bf8..c81130f 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class AustriaIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.austria.AustriaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.austria.AustriaIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -27,7 +27,7 @@ public final class AustriaIdFrontRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.austria.AustriaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.austria.AustriaIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaPassportRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaPassportRecognizerSerialization.java index a9de807..30ef269 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaPassportRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/AustriaPassportRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class AustriaPassportRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.austria.AustriaPassportRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.austria.AustriaPassportRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -34,7 +34,7 @@ public final class AustriaPassportRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.austria.AustriaPassportRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.austria.AustriaPassportRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BarcodeRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BarcodeRecognizerSerialization.java index d0ce6f3..a2ac2f0 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BarcodeRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BarcodeRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BarcodeRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer recognizer = new com.microblink.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer(); recognizer.setAutoScaleDetection(jsonRecognizer.optBoolean("autoScaleDetection", true)); recognizer.setNullQuietZoneAllowed(jsonRecognizer.optBoolean("nullQuietZoneAllowed", false)); @@ -32,7 +32,7 @@ public final class BarcodeRecognizerSerialization implements RecognizerSerializa } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer.Result result = ((com.microblink.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardEliteRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardEliteRecognizerSerialization.java index ef2f57c..c0fd421 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardEliteRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardEliteRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BlinkCardEliteRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkcard.BlinkCardEliteRecognizer recognizer = new com.microblink.entities.recognizers.blinkcard.BlinkCardEliteRecognizer(); recognizer.setAnonymizeCardNumber(jsonRecognizer.optBoolean("anonymizeCardNumber", false)); recognizer.setAnonymizeCvv(jsonRecognizer.optBoolean("anonymizeCvv", false)); @@ -26,7 +26,7 @@ public final class BlinkCardEliteRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkcard.BlinkCardEliteRecognizer.Result result = ((com.microblink.entities.recognizers.blinkcard.BlinkCardEliteRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardRecognizerSerialization.java index c571d68..8906e85 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkCardRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BlinkCardRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkcard.BlinkCardRecognizer recognizer = new com.microblink.entities.recognizers.blinkcard.BlinkCardRecognizer(); recognizer.setAnonymizeCardNumber(jsonRecognizer.optBoolean("anonymizeCardNumber", false)); recognizer.setAnonymizeCvv(jsonRecognizer.optBoolean("anonymizeCvv", false)); @@ -27,7 +27,7 @@ public final class BlinkCardRecognizerSerialization implements RecognizerSeriali } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkcard.BlinkCardRecognizer.Result result = ((com.microblink.entities.recognizers.blinkcard.BlinkCardRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIDSerializationUtils.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIDSerializationUtils.java index 85e111b..8c99381 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIDSerializationUtils.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIDSerializationUtils.java @@ -2,6 +2,7 @@ import com.microblink.entities.recognizers.blinkid.mrtd.MrzResult; import com.microblink.entities.recognizers.blinkid.imageoptions.extension.ImageExtensionFactors; +import com.microblink.entities.recognizers.blinkid.generic.DriverLicenseDetailedInfo; import org.json.JSONException; import org.json.JSONObject; @@ -30,6 +31,14 @@ public static JSONObject serializeMrzResult(MrzResult mrzResult) throws JSONExce return jsonMrz; } + public static JSONObject serializeDriverLicenseDetailedInfo(DriverLicenseDetailedInfo dlDetailedInfo) throws JSONException { + JSONObject jsonDriverLicenseDetailedInfo = new JSONObject(); + jsonDriverLicenseDetailedInfo.put("restrictions", dlDetailedInfo.getRestrictions()); + jsonDriverLicenseDetailedInfo.put("endorsements", dlDetailedInfo.getEndorsements()); + jsonDriverLicenseDetailedInfo.put("vehicleClass", dlDetailedInfo.getVehicleClass()); + return jsonDriverLicenseDetailedInfo; + } + public static ImageExtensionFactors deserializeExtensionFactors(JSONObject jsonExtensionFactors) { if (jsonExtensionFactors == null) { return new ImageExtensionFactors(0.f, 0.f, 0.f, 0.f); diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java new file mode 100644 index 0000000..067fef0 --- /dev/null +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdCombinedRecognizerSerialization.java @@ -0,0 +1,61 @@ +package com.phonegap.plugins.microblink.recognizers.serialization; + +import com.microblink.entities.recognizers.Recognizer; +import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; + +import org.json.JSONException; +import org.json.JSONObject; + +public final class BlinkIdCombinedRecognizerSerialization implements RecognizerSerialization { + + @Override + public Recognizer createRecognizer(JSONObject jsonRecognizer) { + com.microblink.entities.recognizers.blinkid.generic.BlinkIdCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.generic.BlinkIdCombinedRecognizer(); + recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); + recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); + recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); + recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); + recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); + recognizer.setSignResult(jsonRecognizer.optBoolean("signResult", false)); + return recognizer; + } + + @Override + public JSONObject serializeResult(Recognizer recognizer) { + com.microblink.entities.recognizers.blinkid.generic.BlinkIdCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.generic.BlinkIdCombinedRecognizer)recognizer).getResult(); + JSONObject jsonResult = new JSONObject(); + try { + SerializationUtils.addCommonResultData(jsonResult, result); + jsonResult.put("address", result.getAddress()); + jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); + jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); + jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); + jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); + jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); + jsonResult.put("documentDataMatch", result.isDocumentDataMatch()); + jsonResult.put("documentNumber", result.getDocumentNumber()); + jsonResult.put("driverLicenseDetailedInfo", BlinkIDSerializationUtils.serializeDriverLicenseDetailedInfo(result.getDriverLicenseDetailedInfo())); + jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); + jsonResult.put("firstName", result.getFirstName()); + jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); + jsonResult.put("fullName", result.getFullName()); + jsonResult.put("lastName", result.getLastName()); + jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); + jsonResult.put("sex", result.getSex()); + } catch (JSONException e) { + // see https://developer.android.com/reference/org/json/JSONException + throw new RuntimeException(e); + } + return jsonResult; + } + + @Override + public String getJsonName() { + return "BlinkIdCombinedRecognizer"; + } + + @Override + public Class getRecognizerClass() { + return com.microblink.entities.recognizers.blinkid.generic.BlinkIdCombinedRecognizer.class; + } +} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdRecognizerSerialization.java new file mode 100644 index 0000000..b202ae1 --- /dev/null +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BlinkIdRecognizerSerialization.java @@ -0,0 +1,56 @@ +package com.phonegap.plugins.microblink.recognizers.serialization; + +import com.microblink.entities.recognizers.Recognizer; +import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; + +import org.json.JSONException; +import org.json.JSONObject; + +public final class BlinkIdRecognizerSerialization implements RecognizerSerialization { + + @Override + public Recognizer createRecognizer(JSONObject jsonRecognizer) { + com.microblink.entities.recognizers.blinkid.generic.BlinkIdRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.generic.BlinkIdRecognizer(); + recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); + recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); + recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); + recognizer.setReturnFaceImage(jsonRecognizer.optBoolean("returnFaceImage", false)); + recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); + return recognizer; + } + + @Override + public JSONObject serializeResult(Recognizer recognizer) { + com.microblink.entities.recognizers.blinkid.generic.BlinkIdRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.generic.BlinkIdRecognizer)recognizer).getResult(); + JSONObject jsonResult = new JSONObject(); + try { + SerializationUtils.addCommonResultData(jsonResult, result); + jsonResult.put("address", result.getAddress()); + jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); + jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); + jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); + jsonResult.put("documentNumber", result.getDocumentNumber()); + jsonResult.put("driverLicenseDetailedInfo", BlinkIDSerializationUtils.serializeDriverLicenseDetailedInfo(result.getDriverLicenseDetailedInfo())); + jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); + jsonResult.put("firstName", result.getFirstName()); + jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); + jsonResult.put("fullName", result.getFullName()); + jsonResult.put("lastName", result.getLastName()); + jsonResult.put("sex", result.getSex()); + } catch (JSONException e) { + // see https://developer.android.com/reference/org/json/JSONException + throw new RuntimeException(e); + } + return jsonResult; + } + + @Override + public String getJsonName() { + return "BlinkIdRecognizer"; + } + + @Override + public Class getRecognizerClass() { + return com.microblink.entities.recognizers.blinkid.generic.BlinkIdRecognizer.class; + } +} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdBackRecognizerSerialization.java index 858d601..95e32c3 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BruneiIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -22,7 +22,7 @@ public final class BruneiIdBackRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdFrontRecognizerSerialization.java index c45602b..65dc2ae 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BruneiIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -25,7 +25,7 @@ public final class BruneiIdFrontRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdBackRecognizerSerialization.java index 0d8682a..0ce407e 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BruneiMilitaryIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); @@ -23,7 +23,7 @@ public final class BruneiMilitaryIdBackRecognizerSerialization implements Recogn } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdFrontRecognizerSerialization.java index a33ee2b..6fbf536 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiMilitaryIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BruneiMilitaryIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); @@ -23,7 +23,7 @@ public final class BruneiMilitaryIdFrontRecognizerSerialization implements Recog } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiMilitaryIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitBackRecognizerSerialization.java index c4900c9..341f35e 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BruneiResidencePermitBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -22,7 +22,7 @@ public final class BruneiResidencePermitBackRecognizerSerialization implements R } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitFrontRecognizerSerialization.java index c8f3dc3..1e47dd4 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiResidencePermitFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BruneiResidencePermitFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -25,7 +25,7 @@ public final class BruneiResidencePermitFrontRecognizerSerialization implements } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiResidencePermitFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitBackRecognizerSerialization.java index 21151aa..967a1eb 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BruneiTemporaryResidencePermitBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -22,7 +22,7 @@ public final class BruneiTemporaryResidencePermitBackRecognizerSerialization imp } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitFrontRecognizerSerialization.java index 871110a..77d984e 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/BruneiTemporaryResidencePermitFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class BruneiTemporaryResidencePermitFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -26,7 +26,7 @@ public final class BruneiTemporaryResidencePermitFrontRecognizerSerialization im } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.brunei.BruneiTemporaryResidencePermitFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaDlFrontRecognizerSerialization.java index 67b2f6c..8f32af5 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class ColombiaDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.colombia.ColombiaDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.colombia.ColombiaDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -25,7 +25,7 @@ public final class ColombiaDlFrontRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.colombia.ColombiaDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.colombia.ColombiaDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdBackRecognizerSerialization.java index bf71030..6e07683 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class ColombiaIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); @@ -21,7 +21,7 @@ public final class ColombiaIdBackRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdFrontRecognizerSerialization.java index 4ba49d0..f340f3e 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ColombiaIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class ColombiaIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractFirstName(jsonRecognizer.optBoolean("extractFirstName", true)); @@ -25,7 +25,7 @@ public final class ColombiaIdFrontRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.colombia.ColombiaIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaCombinedRecognizerSerialization.java index 02e9750..dae7c18 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaCombinedRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class CroatiaCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.croatia.CroatiaCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.croatia.CroatiaCombinedRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractCitizenship(jsonRecognizer.optBoolean("extractCitizenship", true)); @@ -33,7 +33,7 @@ public final class CroatiaCombinedRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.croatia.CroatiaCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.croatia.CroatiaCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdBackRecognizerSerialization.java index 2bfd98b..55b5a74 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class CroatiaIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfIssue(jsonRecognizer.optBoolean("extractDateOfIssue", true)); @@ -22,7 +22,7 @@ public final class CroatiaIdBackRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdFrontRecognizerSerialization.java index a5ec2b2..36cfcbe 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CroatiaIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class CroatiaIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractCitizenship(jsonRecognizer.optBoolean("extractCitizenship", true)); @@ -29,7 +29,7 @@ public final class CroatiaIdFrontRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.croatia.CroatiaIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdBackRecognizerSerialization.java index 94c005c..dbdae7a 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class CyprusIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); @@ -19,7 +19,7 @@ public final class CyprusIdBackRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdFrontRecognizerSerialization.java index 2c7cf5b..e9f4363 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class CyprusIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); @@ -23,7 +23,7 @@ public final class CyprusIdFrontRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.cyprus.CyprusIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdBackRecognizerSerialization.java index 1f76d2a..bf72e18 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class CyprusOldIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractExpiresOn(jsonRecognizer.optBoolean("extractExpiresOn", true)); @@ -21,7 +21,7 @@ public final class CyprusOldIdBackRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdFrontRecognizerSerialization.java index 2b69d33..6156a56 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CyprusOldIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class CyprusOldIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDocumentNumber(jsonRecognizer.optBoolean("extractDocumentNumber", true)); @@ -24,7 +24,7 @@ public final class CyprusOldIdFrontRecognizerSerialization implements Recognizer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.cyprus.CyprusOldIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaCombinedRecognizerSerialization.java index 2f6e198..da0dbb9 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaCombinedRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class CzechiaCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.czechia.CzechiaCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.czechia.CzechiaCombinedRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); @@ -34,7 +34,7 @@ public final class CzechiaCombinedRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.czechia.CzechiaCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.czechia.CzechiaCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdBackRecognizerSerialization.java index fcf16f1..d23b99d 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class CzechiaIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); @@ -22,7 +22,7 @@ public final class CzechiaIdBackRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdFrontRecognizerSerialization.java index 1104401..2a860f3 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/CzechiaIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class CzechiaIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -30,7 +30,7 @@ public final class CzechiaIdFrontRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.czechia.CzechiaIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/DocumentFaceRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/DocumentFaceRecognizerSerialization.java index 38134ef..7a88dc5 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/DocumentFaceRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/DocumentFaceRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class DocumentFaceRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.documentface.DocumentFaceRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.documentface.DocumentFaceRecognizer(); recognizer.setDetectorType(com.microblink.entities.recognizers.blinkid.documentface.DocumentFaceDetectorType.values()[jsonRecognizer.optInt("detectorType", 1) - 1]); recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); @@ -23,7 +23,7 @@ public final class DocumentFaceRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.documentface.DocumentFaceRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.documentface.DocumentFaceRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EgyptIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EgyptIdFrontRecognizerSerialization.java index f7b2b95..a0f2924 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EgyptIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EgyptIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class EgyptIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.egypt.EgyptIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.egypt.EgyptIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractNationalNumber(jsonRecognizer.optBoolean("extractNationalNumber", true)); @@ -22,7 +22,7 @@ public final class EgyptIdFrontRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.egypt.EgyptIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.egypt.EgyptIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EudlRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EudlRecognizerSerialization.java index e271a20..6811501 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EudlRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/EudlRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class EudlRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.eudl.EudlRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.eudl.EudlRecognizer(); recognizer.setCountry(com.microblink.entities.recognizers.blinkid.eudl.EudlCountry.values()[jsonRecognizer.optInt("country", 4) - 1]); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -26,7 +26,7 @@ public final class EudlRecognizerSerialization implements RecognizerSerializatio } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.eudl.EudlRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.eudl.EudlRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyCombinedRecognizerSerialization.java index 145f356..a54a3bd 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyCombinedRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class GermanyCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyCombinedRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -37,7 +37,7 @@ public final class GermanyCombinedRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlBackRecognizerSerialization.java index 7f395a7..ce4d22e 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class GermanyDlBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyDlBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyDlBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); @@ -19,7 +19,7 @@ public final class GermanyDlBackRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyDlBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyDlBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlFrontRecognizerSerialization.java index 8da9709..c6bfb34 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class GermanyDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -31,7 +31,7 @@ public final class GermanyDlFrontRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdBackRecognizerSerialization.java index 3204198..3bffe12 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class GermanyIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -24,7 +24,7 @@ public final class GermanyIdBackRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdFrontRecognizerSerialization.java index e3be51e..f82ca68 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class GermanyIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractCanNumber(jsonRecognizer.optBoolean("extractCanNumber", true)); @@ -30,7 +30,7 @@ public final class GermanyIdFrontRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdOldRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdOldRecognizerSerialization.java index 452946e..5ca0165 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdOldRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyIdOldRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class GermanyIdOldRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyIdOldRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyIdOldRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractPlaceOfBirth(jsonRecognizer.optBoolean("extractPlaceOfBirth", true)); @@ -24,7 +24,7 @@ public final class GermanyIdOldRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyIdOldRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyIdOldRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyPassportRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyPassportRecognizerSerialization.java index cf17c76..d44f1db 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyPassportRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/GermanyPassportRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class GermanyPassportRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyPassportRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.germany.GermanyPassportRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); @@ -29,7 +29,7 @@ public final class GermanyPassportRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.germany.GermanyPassportRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.germany.GermanyPassportRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/HongKongIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/HongKongIdFrontRecognizerSerialization.java index 718c9ba..5dfa9f6 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/HongKongIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/HongKongIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class HongKongIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.hongkong.HongKongIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.hongkong.HongKongIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractCommercialCode(jsonRecognizer.optBoolean("extractCommercialCode", true)); @@ -27,7 +27,7 @@ public final class HongKongIdFrontRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.hongkong.HongKongIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.hongkong.HongKongIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IndonesiaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IndonesiaIdFrontRecognizerSerialization.java index 847c942..2c65837 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IndonesiaIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IndonesiaIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class IndonesiaIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.indonesia.IndonesiaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.indonesia.IndonesiaIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -37,7 +37,7 @@ public final class IndonesiaIdFrontRecognizerSerialization implements Recognizer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.indonesia.IndonesiaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.indonesia.IndonesiaIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IrelandDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IrelandDlFrontRecognizerSerialization.java index 12f6a75..acc5f24 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IrelandDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/IrelandDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class IrelandDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.ireland.IrelandDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.ireland.IrelandDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -33,7 +33,7 @@ public final class IrelandDlFrontRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.ireland.IrelandDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.ireland.IrelandDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ItalyDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ItalyDlFrontRecognizerSerialization.java index d580bd6..eb9fb69 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ItalyDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/ItalyDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class ItalyDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.italy.ItalyDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.italy.ItalyDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -32,7 +32,7 @@ public final class ItalyDlFrontRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.italy.ItalyDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.italy.ItalyDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanCombinedRecognizerSerialization.java index da06ca6..31b7aa0 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanCombinedRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class JordanCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.jordan.JordanCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.jordan.JordanCombinedRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -26,7 +26,7 @@ public final class JordanCombinedRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.jordan.JordanCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.jordan.JordanCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdBackRecognizerSerialization.java index 8eb59b4..4c93eb3 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class JordanIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.jordan.JordanIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.jordan.JordanIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractFullName(jsonRecognizer.optBoolean("extractFullName", true)); @@ -20,7 +20,7 @@ public final class JordanIdBackRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.jordan.JordanIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.jordan.JordanIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdFrontRecognizerSerialization.java index 014c50e..150ec11 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/JordanIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class JordanIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.jordan.JordanIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.jordan.JordanIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -24,7 +24,7 @@ public final class JordanIdFrontRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.jordan.JordanIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.jordan.JordanIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdBackRecognizerSerialization.java index 9b08b6e..b4b6c2c 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class KuwaitIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractSerialNo(jsonRecognizer.optBoolean("extractSerialNo", true)); @@ -20,7 +20,7 @@ public final class KuwaitIdBackRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdFrontRecognizerSerialization.java index 2c36769..4247067 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/KuwaitIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class KuwaitIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractBirthDate(jsonRecognizer.optBoolean("extractBirthDate", true)); @@ -25,7 +25,7 @@ public final class KuwaitIdFrontRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.kuwait.KuwaitIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaDlFrontRecognizerSerialization.java index c687089..792a032 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MalaysiaDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -27,7 +27,7 @@ public final class MalaysiaDlFrontRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaIkadFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaIkadFrontRecognizerSerialization.java index 9937164..935344b 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaIkadFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaIkadFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MalaysiaIkadFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaIkadFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaIkadFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -30,7 +30,7 @@ public final class MalaysiaIkadFrontRecognizerSerialization implements Recognize } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaIkadFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaIkadFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadBackRecognizerSerialization.java index 4c108d7..e4ccbc1 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MalaysiaMyKadBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractOldNric(jsonRecognizer.optBoolean("extractOldNric", true)); @@ -20,7 +20,7 @@ public final class MalaysiaMyKadBackRecognizerSerialization implements Recognize } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadFrontRecognizerSerialization.java index 99d17cd..0b8eaa9 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKadFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MalaysiaMyKadFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractFullNameAndAddress(jsonRecognizer.optBoolean("extractFullNameAndAddress", true)); @@ -24,7 +24,7 @@ public final class MalaysiaMyKadFrontRecognizerSerialization implements Recogniz } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKadFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKasFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKasFrontRecognizerSerialization.java index 6ef0c0f..b55ef1b 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKasFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyKasFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MalaysiaMyKasFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKasFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKasFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractFullNameAndAddress(jsonRecognizer.optBoolean("extractFullNameAndAddress", true)); @@ -24,7 +24,7 @@ public final class MalaysiaMyKasFrontRecognizerSerialization implements Recogniz } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKasFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyKasFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyPrFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyPrFrontRecognizerSerialization.java index af69955..fd69600 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyPrFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyPrFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MalaysiaMyPrFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyPrFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyPrFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractFullNameAndAddress(jsonRecognizer.optBoolean("extractFullNameAndAddress", true)); @@ -24,7 +24,7 @@ public final class MalaysiaMyPrFrontRecognizerSerialization implements Recognize } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyPrFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyPrFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyTenteraFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyTenteraFrontRecognizerSerialization.java index 0f1ef3b..d559b30 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyTenteraFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MalaysiaMyTenteraFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MalaysiaMyTenteraFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyTenteraFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyTenteraFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractFullNameAndAddress(jsonRecognizer.optBoolean("extractFullNameAndAddress", true)); @@ -23,7 +23,7 @@ public final class MalaysiaMyTenteraFrontRecognizerSerialization implements Reco } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyTenteraFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.malaysia.MalaysiaMyTenteraFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MexicoVoterIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MexicoVoterIdFrontRecognizerSerialization.java index efe3df6..b3236ac 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MexicoVoterIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MexicoVoterIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MexicoVoterIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.mexico.MexicoVoterIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.mexico.MexicoVoterIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -26,7 +26,7 @@ public final class MexicoVoterIdFrontRecognizerSerialization implements Recogniz } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.mexico.MexicoVoterIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.mexico.MexicoVoterIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdBackRecognizerSerialization.java index d8ed972..98a89d8 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MoroccoIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -25,7 +25,7 @@ public final class MoroccoIdBackRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdFrontRecognizerSerialization.java index cca2e28..765dbd5 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MoroccoIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MoroccoIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -29,7 +29,7 @@ public final class MoroccoIdFrontRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.morocco.MoroccoIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdCombinedRecognizerSerialization.java index 2bc8fe8..224d679 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdCombinedRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MrtdCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.mrtd.MrtdCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.mrtd.MrtdCombinedRecognizer(); recognizer.setAllowSpecialCharacters(jsonRecognizer.optBoolean("allowSpecialCharacters", false)); recognizer.setAllowUnparsedResults(jsonRecognizer.optBoolean("allowUnparsedResults", false)); @@ -26,7 +26,7 @@ public final class MrtdCombinedRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.mrtd.MrtdCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.mrtd.MrtdCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdRecognizerSerialization.java index 413bd66..38f5efd 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/MrtdRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class MrtdRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.mrtd.MrtdRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.mrtd.MrtdRecognizer(); recognizer.setAllowSpecialCharacters(jsonRecognizer.optBoolean("allowSpecialCharacters", false)); recognizer.setAllowUnparsedResults(jsonRecognizer.optBoolean("allowUnparsedResults", false)); @@ -22,7 +22,7 @@ public final class MrtdRecognizerSerialization implements RecognizerSerializatio } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.mrtd.MrtdRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.mrtd.MrtdRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NewZealandDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NewZealandDlFrontRecognizerSerialization.java index 6ec9fe1..42acf6a 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NewZealandDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NewZealandDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class NewZealandDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.newzealand.NewZealandDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.newzealand.NewZealandDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -30,7 +30,7 @@ public final class NewZealandDlFrontRecognizerSerialization implements Recognize } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.newzealand.NewZealandDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.newzealand.NewZealandDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NigeriaVoterIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NigeriaVoterIdBackRecognizerSerialization.java new file mode 100644 index 0000000..91bb4e6 --- /dev/null +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/NigeriaVoterIdBackRecognizerSerialization.java @@ -0,0 +1,50 @@ +package com.phonegap.plugins.microblink.recognizers.serialization; + +import com.microblink.entities.recognizers.Recognizer; +import com.phonegap.plugins.microblink.recognizers.RecognizerSerialization; + +import org.json.JSONException; +import org.json.JSONObject; + +public final class NigeriaVoterIdBackRecognizerSerialization implements RecognizerSerialization { + + @Override + public Recognizer createRecognizer(JSONObject jsonRecognizer) { + com.microblink.entities.recognizers.blinkid.nigeria.NigeriaVoterIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.nigeria.NigeriaVoterIdBackRecognizer(); + recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); + recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); + recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors"))); + recognizer.setReturnFullDocumentImage(jsonRecognizer.optBoolean("returnFullDocumentImage", false)); + return recognizer; + } + + @Override + public JSONObject serializeResult(Recognizer recognizer) { + com.microblink.entities.recognizers.blinkid.nigeria.NigeriaVoterIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.nigeria.NigeriaVoterIdBackRecognizer)recognizer).getResult(); + JSONObject jsonResult = new JSONObject(); + try { + SerializationUtils.addCommonResultData(jsonResult, result); + jsonResult.put("address", result.getAddress()); + jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); + jsonResult.put("firstName", result.getFirstName()); + jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); + jsonResult.put("rawBarcodeData", result.getRawBarcodeData()); + jsonResult.put("sex", result.getSex()); + jsonResult.put("surname", result.getSurname()); + } catch (JSONException e) { + // see https://developer.android.com/reference/org/json/JSONException + throw new RuntimeException(e); + } + return jsonResult; + } + + @Override + public String getJsonName() { + return "NigeriaVoterIdBackRecognizer"; + } + + @Override + public Class getRecognizerClass() { + return com.microblink.entities.recognizers.blinkid.nigeria.NigeriaVoterIdBackRecognizer.class; + } +} \ No newline at end of file diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PassportRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PassportRecognizerSerialization.java index 52e8861..fe9c249 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PassportRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PassportRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class PassportRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.passport.PassportRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.passport.PassportRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); @@ -21,7 +21,7 @@ public final class PassportRecognizerSerialization implements RecognizerSerializ } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.passport.PassportRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.passport.PassportRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/Pdf417RecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/Pdf417RecognizerSerialization.java index 7a660ff..692696a 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/Pdf417RecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/Pdf417RecognizerSerialization.java @@ -9,7 +9,7 @@ public final class Pdf417RecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkbarcode.pdf417.Pdf417Recognizer recognizer = new com.microblink.entities.recognizers.blinkbarcode.pdf417.Pdf417Recognizer(); recognizer.setNullQuietZoneAllowed(jsonRecognizer.optBoolean("nullQuietZoneAllowed", false)); recognizer.setScanInverse(jsonRecognizer.optBoolean("scanInverse", false)); @@ -18,7 +18,7 @@ public final class Pdf417RecognizerSerialization implements RecognizerSerializat } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkbarcode.pdf417.Pdf417Recognizer.Result result = ((com.microblink.entities.recognizers.blinkbarcode.pdf417.Pdf417Recognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandCombinedRecognizerSerialization.java index 0673f77..3bdc183 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandCombinedRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class PolandCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.poland.PolandCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.poland.PolandCombinedRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -28,7 +28,7 @@ public final class PolandCombinedRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.poland.PolandCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.poland.PolandCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdBackRecognizerSerialization.java index 2c9bb88..fbabeb5 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class PolandIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.poland.PolandIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.poland.PolandIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); @@ -19,7 +19,7 @@ public final class PolandIdBackRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.poland.PolandIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.poland.PolandIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdFrontRecognizerSerialization.java index 64b89be..ea3f6cd 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/PolandIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class PolandIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.poland.PolandIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.poland.PolandIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -27,7 +27,7 @@ public final class PolandIdFrontRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.poland.PolandIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.poland.PolandIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/RomaniaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/RomaniaIdFrontRecognizerSerialization.java index ca4a65a..23cfdf7 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/RomaniaIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/RomaniaIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class RomaniaIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.romania.RomaniaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.romania.RomaniaIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -29,12 +29,13 @@ public final class RomaniaIdFrontRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.romania.RomaniaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.romania.RomaniaIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { SerializationUtils.addCommonResultData(jsonResult, result); jsonResult.put("address", result.getAddress()); + jsonResult.put("cnpNumber", result.getCnpNumber()); jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SimNumberRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SimNumberRecognizerSerialization.java index 3a3e3bb..b554bfa 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SimNumberRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SimNumberRecognizerSerialization.java @@ -9,13 +9,13 @@ public final class SimNumberRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkbarcode.simnumber.SimNumberRecognizer recognizer = new com.microblink.entities.recognizers.blinkbarcode.simnumber.SimNumberRecognizer(); return recognizer; } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkbarcode.simnumber.SimNumberRecognizer.Result result = ((com.microblink.entities.recognizers.blinkbarcode.simnumber.SimNumberRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeChangiEmployeeIdRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeChangiEmployeeIdRecognizerSerialization.java index 30f4fea..07443d4 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeChangiEmployeeIdRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeChangiEmployeeIdRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SingaporeChangiEmployeeIdRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.singapore.SingaporeChangiEmployeeIdRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.singapore.SingaporeChangiEmployeeIdRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractCompanyName(jsonRecognizer.optBoolean("extractCompanyName", true)); @@ -24,7 +24,7 @@ public final class SingaporeChangiEmployeeIdRecognizerSerialization implements R } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.singapore.SingaporeChangiEmployeeIdRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.singapore.SingaporeChangiEmployeeIdRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeCombinedRecognizerSerialization.java index f504e12..13c82d8 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeCombinedRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SingaporeCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.singapore.SingaporeCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.singapore.SingaporeCombinedRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -31,7 +31,7 @@ public final class SingaporeCombinedRecognizerSerialization implements Recognize } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.singapore.SingaporeCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.singapore.SingaporeCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeDlFrontRecognizerSerialization.java index 239b8a0..2c6754d 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SingaporeDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.singapore.SingaporeDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.singapore.SingaporeDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractBirthDate(jsonRecognizer.optBoolean("extractBirthDate", true)); @@ -25,7 +25,7 @@ public final class SingaporeDlFrontRecognizerSerialization implements Recognizer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.singapore.SingaporeDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.singapore.SingaporeDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdBackRecognizerSerialization.java index 17e7481..bbaf286 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SingaporeIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -23,7 +23,7 @@ public final class SingaporeIdBackRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdFrontRecognizerSerialization.java index 3fd9e78..2c1d84f 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SingaporeIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SingaporeIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractCountryOfBirth(jsonRecognizer.optBoolean("extractCountryOfBirth", true)); @@ -26,7 +26,7 @@ public final class SingaporeIdFrontRecognizerSerialization implements Recognizer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.singapore.SingaporeIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaCombinedRecognizerSerialization.java index 0d93fb5..4f06646 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaCombinedRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SlovakiaCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaCombinedRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -37,7 +37,7 @@ public final class SlovakiaCombinedRecognizerSerialization implements Recognizer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdBackRecognizerSerialization.java index 9483905..414c545 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SlovakiaIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -23,7 +23,7 @@ public final class SlovakiaIdBackRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdFrontRecognizerSerialization.java index 2d02c59..9d204ad 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SlovakiaIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SlovakiaIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -32,7 +32,7 @@ public final class SlovakiaIdFrontRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovakia.SlovakiaIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaCombinedRecognizerSerialization.java index deadabc..a41b0c6 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaCombinedRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SloveniaCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.slovenia.SloveniaCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovenia.SloveniaCombinedRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -32,7 +32,7 @@ public final class SloveniaCombinedRecognizerSerialization implements Recognizer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.slovenia.SloveniaCombinedRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovenia.SloveniaCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { @@ -41,6 +41,7 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("administrativeUnit", result.getAdministrativeUnit()); jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); + jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); jsonResult.put("dateOfIssue", SerializationUtils.serializeDate(result.getDateOfIssue())); jsonResult.put("digitalSignature", SerializationUtils.encodeByteArrayToBase64(result.getDigitalSignature())); jsonResult.put("digitalSignatureVersion", (int)result.getDigitalSignatureVersion()); diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdBackRecognizerSerialization.java index c9cecdd..1f93407 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SloveniaIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAddress(jsonRecognizer.optBoolean("extractAddress", true)); @@ -22,7 +22,7 @@ public final class SloveniaIdBackRecognizerSerialization implements RecognizerSe } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdFrontRecognizerSerialization.java index 0f52b59..c1d7c5a 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SloveniaIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SloveniaIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfExpiry(jsonRecognizer.optBoolean("extractDateOfExpiry", true)); @@ -28,13 +28,14 @@ public final class SloveniaIdFrontRecognizerSerialization implements RecognizerS } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.slovenia.SloveniaIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { SerializationUtils.addCommonResultData(jsonResult, result); jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth())); jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry())); + jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); jsonResult.put("givenNames", result.getGivenNames()); diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SpainDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SpainDlFrontRecognizerSerialization.java index d8c2d3e..53e3775 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SpainDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SpainDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SpainDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.spain.SpainDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.spain.SpainDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -31,7 +31,7 @@ public final class SpainDlFrontRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.spain.SpainDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.spain.SpainDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SuccessFrameGrabberRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SuccessFrameGrabberRecognizerSerialization.java index e06b31c..c96892f 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SuccessFrameGrabberRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SuccessFrameGrabberRecognizerSerialization.java @@ -10,11 +10,11 @@ public final class SuccessFrameGrabberRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { try { // first obtain slave recognizer JSONObject jsonSlaveRecognizer = jsonRecognizer.getJSONObject("slaveRecognizer"); - Recognizer slaveRecognizer = RecognizerSerializers.INSTANCE.getRecognizerSerialization(jsonSlaveRecognizer).createRecognizer(jsonSlaveRecognizer); + Recognizer slaveRecognizer = RecognizerSerializers.INSTANCE.getRecognizerSerialization(jsonSlaveRecognizer).createRecognizer(jsonSlaveRecognizer); return new SuccessFrameGrabberRecognizer(slaveRecognizer); } catch (JSONException e) { // see https://developer.android.com/reference/org/json/JSONException @@ -23,7 +23,7 @@ public final class SuccessFrameGrabberRecognizerSerialization implements Recogni } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { SuccessFrameGrabberRecognizer sfgr = (SuccessFrameGrabberRecognizer) recognizer; JSONObject jsonSlaveResult = RecognizerSerializers.INSTANCE.getRecognizerSerialization(sfgr.getSlaveRecognizer()).serializeResult(sfgr.getSlaveRecognizer()); diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwedenDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwedenDlFrontRecognizerSerialization.java index 6fa6135..589b99b 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwedenDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwedenDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SwedenDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.sweden.SwedenDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.sweden.SwedenDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -31,7 +31,7 @@ public final class SwedenDlFrontRecognizerSerialization implements RecognizerSer } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.sweden.SwedenDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.sweden.SwedenDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandDlFrontRecognizerSerialization.java index a71ad92..87735bd 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SwitzerlandDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -31,7 +31,7 @@ public final class SwitzerlandDlFrontRecognizerSerialization implements Recogniz } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdBackRecognizerSerialization.java index 9abda40..ead371f 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SwitzerlandIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); @@ -25,7 +25,7 @@ public final class SwitzerlandIdBackRecognizerSerialization implements Recognize } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdFrontRecognizerSerialization.java index 0331845..f2b7c69 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SwitzerlandIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractGivenName(jsonRecognizer.optBoolean("extractGivenName", true)); @@ -25,7 +25,7 @@ public final class SwitzerlandIdFrontRecognizerSerialization implements Recogniz } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandPassportRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandPassportRecognizerSerialization.java index 7b9a0a4..0f48fea 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandPassportRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/SwitzerlandPassportRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class SwitzerlandPassportRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandPassportRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandPassportRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractAuthority(jsonRecognizer.optBoolean("extractAuthority", true)); @@ -31,7 +31,7 @@ public final class SwitzerlandPassportRecognizerSerialization implements Recogni } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandPassportRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.switzerland.SwitzerlandPassportRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesDlFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesDlFrontRecognizerSerialization.java index 5dfc9a8..07a6e37 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesDlFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesDlFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class UnitedArabEmiratesDlFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesDlFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesDlFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractDateOfBirth(jsonRecognizer.optBoolean("extractDateOfBirth", true)); @@ -28,7 +28,7 @@ public final class UnitedArabEmiratesDlFrontRecognizerSerialization implements R } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesDlFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesDlFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdBackRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdBackRecognizerSerialization.java index dbf5a43..f735ac2 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdBackRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdBackRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class UnitedArabEmiratesIdBackRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdBackRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdBackRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); @@ -19,7 +19,7 @@ public final class UnitedArabEmiratesIdBackRecognizerSerialization implements Re } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdBackRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdBackRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdFrontRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdFrontRecognizerSerialization.java index 3e3f9aa..ace620f 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdFrontRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UnitedArabEmiratesIdFrontRecognizerSerialization.java @@ -9,7 +9,7 @@ public final class UnitedArabEmiratesIdFrontRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdFrontRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdFrontRecognizer(); recognizer.setDetectGlare(jsonRecognizer.optBoolean("detectGlare", true)); recognizer.setExtractName(jsonRecognizer.optBoolean("extractName", true)); @@ -23,7 +23,7 @@ public final class UnitedArabEmiratesIdFrontRecognizerSerialization implements R } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdFrontRecognizer.Result result = ((com.microblink.entities.recognizers.blinkid.unitedArabEmirates.UnitedArabEmiratesIdFrontRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlCombinedRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlCombinedRecognizerSerialization.java index ecd6cc7..a5f67c0 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlCombinedRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlCombinedRecognizerSerialization.java @@ -12,7 +12,7 @@ public final class UsdlCombinedRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { UsdlCombinedRecognizer recognizer = new UsdlCombinedRecognizer(); recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250)); recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250)); @@ -25,7 +25,7 @@ public final class UsdlCombinedRecognizerSerialization implements RecognizerSeri } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { UsdlCombinedRecognizer.Result result = ((UsdlCombinedRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlRecognizerSerialization.java index e21a4ad..f1e6a7a 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/UsdlRecognizerSerialization.java @@ -12,7 +12,7 @@ public final class UsdlRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkbarcode.usdl.UsdlRecognizer recognizer = new com.microblink.entities.recognizers.blinkbarcode.usdl.UsdlRecognizer(); recognizer.setNullQuietZoneAllowed(jsonRecognizer.optBoolean("nullQuietZoneAllowed", true)); recognizer.setUncertainDecoding(jsonRecognizer.optBoolean("uncertainDecoding", true)); @@ -20,7 +20,7 @@ public final class UsdlRecognizerSerialization implements RecognizerSerializatio } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { UsdlRecognizer.Result result = ((UsdlRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/VinRecognizerSerialization.java b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/VinRecognizerSerialization.java index 5ca5388..9512c11 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/VinRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/microblink/recognizers/serialization/VinRecognizerSerialization.java @@ -9,13 +9,13 @@ public final class VinRecognizerSerialization implements RecognizerSerialization { @Override - public Recognizer createRecognizer(JSONObject jsonRecognizer) { + public Recognizer createRecognizer(JSONObject jsonRecognizer) { com.microblink.entities.recognizers.blinkbarcode.vin.VinRecognizer recognizer = new com.microblink.entities.recognizers.blinkbarcode.vin.VinRecognizer(); return recognizer; } @Override - public JSONObject serializeResult(Recognizer recognizer) { + public JSONObject serializeResult(Recognizer recognizer) { com.microblink.entities.recognizers.blinkbarcode.vin.VinRecognizer.Result result = ((com.microblink.entities.recognizers.blinkbarcode.vin.VinRecognizer)recognizer).getResult(); JSONObject jsonResult = new JSONObject(); try { diff --git a/BlinkID/src/android/libBlinkID.gradle b/BlinkID/src/android/libBlinkID.gradle index 697dbf0..241f416 100644 --- a/BlinkID/src/android/libBlinkID.gradle +++ b/BlinkID/src/android/libBlinkID.gradle @@ -5,7 +5,7 @@ repositories { } dependencies { - implementation('com.microblink:blinkid:4.9.0@aar') { + implementation('com.microblink:blinkid:4.10.0@aar') { transitive = true } } diff --git a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h index 8d58ac0..4a51b1b 100644 --- a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h +++ b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h @@ -13,5 +13,6 @@ +(NSDictionary * _Nonnull) serializeMrzResult:(MBMrzResult * _Nonnull)mrzResult; +(MBImageExtensionFactors) deserializeMBImageExtensionFactors:(NSDictionary * _Nullable)jsonExtensionFactors; ++(NSDictionary * _Nonnull) serializeDriverLicenseDetailedInfo:(MBDriverLicenseDetailedInfo * _Nonnull)driverLicenseDetailedInfo; @end diff --git a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m index d895519..9f645e5 100644 --- a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m +++ b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m @@ -46,4 +46,12 @@ +(MBImageExtensionFactors) deserializeMBImageExtensionFactors:(NSDictionary *)js } } ++(NSDictionary *) serializeDriverLicenseDetailedInfo:(MBDriverLicenseDetailedInfo *)driverLicenseDetailedInfo { + return @{ + @"restrictions" : driverLicenseDetailedInfo.restrictions, + @"endorsements" : driverLicenseDetailedInfo.endorsements, + @"vehicleClass" : driverLicenseDetailedInfo.vehicleClass, + }; +} + @end diff --git a/BlinkID/src/ios/sources/Overlays/MBOverlaySettingsSerializers.m b/BlinkID/src/ios/sources/Overlays/MBOverlaySettingsSerializers.m index c2ac581..3db2475 100644 --- a/BlinkID/src/ios/sources/Overlays/MBOverlaySettingsSerializers.m +++ b/BlinkID/src/ios/sources/Overlays/MBOverlaySettingsSerializers.m @@ -13,6 +13,7 @@ #import "MBBlinkCardOverlaySettingsSerialization.h" #import "MBDocumentOverlaySettingsSerialization.h" #import "MBDocumentVerificationOverlaySettingsSerialization.h" +#import "MBBlinkIdOverlaySettingsSerialization.h" @interface MBOverlaySettingsSerializers () @@ -35,6 +36,7 @@ - (instancetype)init { [self registerMapping:[[MBBlinkCardOverlaySettingsSerialization alloc] init]]; [self registerMapping:[[MBDocumentOverlaySettingsSerialization alloc] init]]; [self registerMapping:[[MBDocumentVerificationOverlaySettingsSerialization alloc] init]]; + [self registerMapping:[[MBBlinkIdOverlaySettingsSerialization alloc] init]]; } return self; } diff --git a/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.h b/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.h new file mode 100644 index 0000000..5da5f46 --- /dev/null +++ b/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.h @@ -0,0 +1,14 @@ +// +// MBBlinkCardOverlaySettingsSerialization.h +// BlinkIdDevDemo +// +// Created by DoDo on 04/06/2018. +// + +#import "MBOverlayVCCreator.h" + +#import + +@interface MBBlinkIdOverlaySettingsSerialization : NSObject + +@end diff --git a/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.m b/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.m new file mode 100644 index 0000000..ec0e99d --- /dev/null +++ b/BlinkID/src/ios/sources/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.m @@ -0,0 +1,45 @@ +// +// MBBlinkIdOverlaySettingsSerialization.m +// BlinkIdDevDemo +// +// Created by DoDo on 04/06/2018. +// + +#import "MBBlinkIdOverlaySettingsSerialization.h" + +@interface MBBlinkIdOverlaySettingsSerialization () + +@property (nonatomic, weak) id delegate; + +@end + +@implementation MBBlinkIdOverlaySettingsSerialization + +@synthesize jsonName = _jsonName; + +-(instancetype) init { + self = [super init]; + if (self) { + _jsonName = @"BlinkIdOverlaySettings"; + } + return self; +} + +-(MBOverlayViewController *) createOverlayViewController:(NSDictionary *)jsonOverlaySettings recognizerCollection:(MBRecognizerCollection*)recognizerCollection delegate:(id) delegate { + // no settings deserialized at the moment + MBBlinkIdOverlaySettings *sett = [[MBBlinkIdOverlaySettings alloc] init]; + self.delegate = delegate; + + return [[MBBlinkIdOverlayViewController alloc] initWithSettings:sett recognizerCollection:recognizerCollection delegate:self]; +} + +- (void)blinkIdOverlayViewControllerDidFinishScanning:(nonnull MBBlinkIdOverlayViewController *)blinkIdOverlayViewController state:(MBRecognizerResultState)state { + [self.delegate overlayViewControllerDidFinishScanning:blinkIdOverlayViewController state:state]; +} + +- (void)blinkIdOverlayViewControllerDidTapClose:(nonnull MBBlinkIdOverlayViewController *)blinkIdOverlayViewController { + [self.delegate overlayDidTapClose:blinkIdOverlayViewController]; +} + + +@end diff --git a/BlinkID/src/ios/sources/Recognizers/MBRecognizerSerializers.m b/BlinkID/src/ios/sources/Recognizers/MBRecognizerSerializers.m index 874f0b7..1539bf8 100644 --- a/BlinkID/src/ios/sources/Recognizers/MBRecognizerSerializers.m +++ b/BlinkID/src/ios/sources/Recognizers/MBRecognizerSerializers.m @@ -12,6 +12,8 @@ #import "MBBarcodeRecognizerWrapper.h" #import "MBBlinkCardEliteRecognizerWrapper.h" #import "MBBlinkCardRecognizerWrapper.h" +#import "MBBlinkIdCombinedRecognizerWrapper.h" +#import "MBBlinkIdRecognizerWrapper.h" #import "MBBruneiIdBackRecognizerWrapper.h" #import "MBBruneiIdFrontRecognizerWrapper.h" #import "MBBruneiMilitaryIdBackRecognizerWrapper.h" @@ -65,6 +67,7 @@ #import "MBMrtdCombinedRecognizerWrapper.h" #import "MBMrtdRecognizerWrapper.h" #import "MBNewZealandDlFrontRecognizerWrapper.h" +#import "MBNigeriaVoterIdBackRecognizerWrapper.h" #import "MBPassportRecognizerWrapper.h" #import "MBPdf417RecognizerWrapper.h" #import "MBPolandCombinedRecognizerWrapper.h" @@ -124,6 +127,8 @@ - (instancetype)init { [self registerCreator:[[MBBarcodeRecognizerCreator alloc] init]]; [self registerCreator:[[MBBlinkCardEliteRecognizerCreator alloc] init]]; [self registerCreator:[[MBBlinkCardRecognizerCreator alloc] init]]; + [self registerCreator:[[MBBlinkIdCombinedRecognizerCreator alloc] init]]; + [self registerCreator:[[MBBlinkIdRecognizerCreator alloc] init]]; [self registerCreator:[[MBBruneiIdBackRecognizerCreator alloc] init]]; [self registerCreator:[[MBBruneiIdFrontRecognizerCreator alloc] init]]; [self registerCreator:[[MBBruneiMilitaryIdBackRecognizerCreator alloc] init]]; @@ -177,6 +182,7 @@ - (instancetype)init { [self registerCreator:[[MBMrtdCombinedRecognizerCreator alloc] init]]; [self registerCreator:[[MBMrtdRecognizerCreator alloc] init]]; [self registerCreator:[[MBNewZealandDlFrontRecognizerCreator alloc] init]]; + [self registerCreator:[[MBNigeriaVoterIdBackRecognizerCreator alloc] init]]; [self registerCreator:[[MBPassportRecognizerCreator alloc] init]]; [self registerCreator:[[MBPdf417RecognizerCreator alloc] init]]; [self registerCreator:[[MBPolandCombinedRecognizerCreator alloc] init]]; diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.h new file mode 100644 index 0000000..dd998cd --- /dev/null +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.h @@ -0,0 +1,6 @@ +#import "MBRecognizerWrapper.h" +#import + +@interface MBBlinkIdCombinedRecognizerCreator : NSObject + +@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m new file mode 100644 index 0000000..48eda6c --- /dev/null +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdCombinedRecognizerWrapper.m @@ -0,0 +1,88 @@ +#import "MBBlinkIdCombinedRecognizerWrapper.h" +#import "MBSerializationUtils.h" +#import "MBBlinkIDSerializationUtils.h" + +@implementation MBBlinkIdCombinedRecognizerCreator + +@synthesize jsonName = _jsonName; + +-(instancetype) init { + self = [super init]; + if (self) { + _jsonName = @"BlinkIdCombinedRecognizer"; + } + return self; +} + +-(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { + MBBlinkIdCombinedRecognizer *recognizer = [[MBBlinkIdCombinedRecognizer alloc] init]; + { + id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; + if (faceImageDpi != nil) { + recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; + } + } + { + id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; + if (fullDocumentImageDpi != nil) { + recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; + } + } + { + id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; + if (fullDocumentImageExtensionFactors != nil) { + recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; + } + } + { + id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; + if (returnFaceImage != nil) { + recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; + } + } + { + id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; + if (returnFullDocumentImage != nil) { + recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; + } + } + { + id signResult = [jsonRecognizer valueForKey:@"signResult"]; + if (signResult != nil) { + recognizer.signResult = [(NSNumber *)signResult boolValue]; + } + } + + return recognizer; +} + +@end + +@interface MBBlinkIdCombinedRecognizer (JsonSerialization) +@end + +@implementation MBBlinkIdCombinedRecognizer (JsonSerialization) + +-(NSDictionary *) serializeResult { + NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; + [jsonResult setValue:self.result.address forKey:@"address"]; + [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; + [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; + [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 numberWithBool:self.result.documentDataMatch] forKey:@"documentDataMatch"]; + [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeDriverLicenseDetailedInfo:self.result.driverLicenseDetailedInfo] forKey:@"driverLicenseDetailedInfo"]; + [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; + [jsonResult setValue:self.result.firstName forKey:@"firstName"]; + [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; + [jsonResult setValue:self.result.fullName forKey:@"fullName"]; + [jsonResult setValue:self.result.lastName forKey:@"lastName"]; + [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; + [jsonResult setValue:self.result.sex forKey:@"sex"]; + + return jsonResult; +} + +@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.h new file mode 100644 index 0000000..2c20aa8 --- /dev/null +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.h @@ -0,0 +1,6 @@ +#import "MBRecognizerWrapper.h" +#import + +@interface MBBlinkIdRecognizerCreator : NSObject + +@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.m new file mode 100644 index 0000000..26931f6 --- /dev/null +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdRecognizerWrapper.m @@ -0,0 +1,78 @@ +#import "MBBlinkIdRecognizerWrapper.h" +#import "MBSerializationUtils.h" +#import "MBBlinkIDSerializationUtils.h" + +@implementation MBBlinkIdRecognizerCreator + +@synthesize jsonName = _jsonName; + +-(instancetype) init { + self = [super init]; + if (self) { + _jsonName = @"BlinkIdRecognizer"; + } + return self; +} + +-(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { + MBBlinkIdRecognizer *recognizer = [[MBBlinkIdRecognizer alloc] init]; + { + id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; + if (faceImageDpi != nil) { + recognizer.faceImageDpi = [(NSNumber *)faceImageDpi unsignedIntegerValue]; + } + } + { + id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; + if (fullDocumentImageDpi != nil) { + recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; + } + } + { + id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; + if (fullDocumentImageExtensionFactors != nil) { + recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; + } + } + { + id returnFaceImage = [jsonRecognizer valueForKey:@"returnFaceImage"]; + if (returnFaceImage != nil) { + recognizer.returnFaceImage = [(NSNumber *)returnFaceImage boolValue]; + } + } + { + id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; + if (returnFullDocumentImage != nil) { + recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; + } + } + + return recognizer; +} + +@end + +@interface MBBlinkIdRecognizer (JsonSerialization) +@end + +@implementation MBBlinkIdRecognizer (JsonSerialization) + +-(NSDictionary *) serializeResult { + NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; + [jsonResult setValue:self.result.address forKey:@"address"]; + [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; + [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; + [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; + [jsonResult setValue:self.result.documentNumber forKey:@"documentNumber"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeDriverLicenseDetailedInfo:self.result.driverLicenseDetailedInfo] forKey:@"driverLicenseDetailedInfo"]; + [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; + [jsonResult setValue:self.result.firstName forKey:@"firstName"]; + [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; + [jsonResult setValue:self.result.fullName forKey:@"fullName"]; + [jsonResult setValue:self.result.lastName forKey:@"lastName"]; + [jsonResult setValue:self.result.sex forKey:@"sex"]; + + return jsonResult; +} + +@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.h b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.h new file mode 100644 index 0000000..e3640cb --- /dev/null +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.h @@ -0,0 +1,6 @@ +#import "MBRecognizerWrapper.h" +#import + +@interface MBNigeriaVoterIdBackRecognizerCreator : NSObject + +@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.m new file mode 100644 index 0000000..4d6f8f6 --- /dev/null +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBNigeriaVoterIdBackRecognizerWrapper.m @@ -0,0 +1,67 @@ +#import "MBNigeriaVoterIdBackRecognizerWrapper.h" +#import "MBSerializationUtils.h" +#import "MBBlinkIDSerializationUtils.h" + +@implementation MBNigeriaVoterIdBackRecognizerCreator + +@synthesize jsonName = _jsonName; + +-(instancetype) init { + self = [super init]; + if (self) { + _jsonName = @"NigeriaVoterIdBackRecognizer"; + } + return self; +} + +-(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { + MBNigeriaVoterIdBackRecognizer *recognizer = [[MBNigeriaVoterIdBackRecognizer alloc] init]; + { + id detectGlare = [jsonRecognizer valueForKey:@"detectGlare"]; + if (detectGlare != nil) { + recognizer.detectGlare = [(NSNumber *)detectGlare boolValue]; + } + } + { + id fullDocumentImageDpi = [jsonRecognizer valueForKey:@"fullDocumentImageDpi"]; + if (fullDocumentImageDpi != nil) { + recognizer.fullDocumentImageDpi = [(NSNumber *)fullDocumentImageDpi unsignedIntegerValue]; + } + } + { + id fullDocumentImageExtensionFactors = [jsonRecognizer valueForKey:@"fullDocumentImageExtensionFactors"]; + if (fullDocumentImageExtensionFactors != nil) { + recognizer.fullDocumentImageExtensionFactors = [MBBlinkIDSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; + } + } + { + id returnFullDocumentImage = [jsonRecognizer valueForKey:@"returnFullDocumentImage"]; + if (returnFullDocumentImage != nil) { + recognizer.returnFullDocumentImage = [(NSNumber *)returnFullDocumentImage boolValue]; + } + } + + return recognizer; +} + +@end + +@interface MBNigeriaVoterIdBackRecognizer (JsonSerialization) +@end + +@implementation MBNigeriaVoterIdBackRecognizer (JsonSerialization) + +-(NSDictionary *) serializeResult { + NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; + [jsonResult setValue:self.result.address forKey:@"address"]; + [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; + [jsonResult setValue:self.result.firstName forKey:@"firstName"]; + [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; + [jsonResult setValue:self.result.rawBarcodeData forKey:@"rawBarcodeData"]; + [jsonResult setValue:self.result.sex forKey:@"sex"]; + [jsonResult setValue:self.result.surname forKey:@"surname"]; + + return jsonResult; +} + +@end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.m index ec5c312..e0538c8 100644 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.m +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBRomaniaIdFrontRecognizerWrapper.m @@ -114,6 +114,7 @@ @implementation MBRomaniaIdFrontRecognizer (JsonSerialization) -(NSDictionary *) serializeResult { NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; [jsonResult setValue:self.result.address forKey:@"address"]; + [jsonResult setValue:self.result.cnpNumber forKey:@"cnpNumber"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfIssue] forKey:@"dateOfIssue"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.m index 9270122..7a6fddb 100644 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.m +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaCombinedRecognizerWrapper.m @@ -135,6 +135,7 @@ -(NSDictionary *) serializeResult { [jsonResult setValue:self.result.administrativeUnit forKey:@"administrativeUnit"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; + [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"]; diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdFrontRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdFrontRecognizerWrapper.m index a95762f..02e5c54 100644 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdFrontRecognizerWrapper.m +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBSloveniaIdFrontRecognizerWrapper.m @@ -109,6 +109,7 @@ -(NSDictionary *) serializeResult { NSMutableDictionary* jsonResult = (NSMutableDictionary*)[super serializeResult]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"]; [jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"]; + [jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.fullDocumentImage] forKey:@"fullDocumentImage"]; [jsonResult setValue:self.result.givenNames forKey:@"givenNames"]; diff --git a/BlinkID/www/blinkIdScanner.js b/BlinkID/www/blinkIdScanner.js index cfdeedc..0d8cf41 100644 --- a/BlinkID/www/blinkIdScanner.js +++ b/BlinkID/www/blinkIdScanner.js @@ -550,6 +550,18 @@ BlinkCardOverlaySettings.prototype = new OverlaySettings(); BlinkID.prototype.BlinkCardOverlaySettings = BlinkCardOverlaySettings; +/** + * Class for setting up BlinkId overlay. + * BlinkId overlay is best suited for recognizers that perform ID document scanning. + */ +function BlinkIdOverlaySettings() { + OverlaySettings.call(this, 'BlinkIdOverlaySettings'); +} +BlinkIdOverlaySettings.prototype = new OverlaySettings(); + +BlinkID.prototype.BlinkIdOverlaySettings = BlinkIdOverlaySettings; + + // OVERLAY SETTINGS // RECOGNIZERS @@ -2417,6 +2429,285 @@ BlinkCardRecognizer.prototype = new Recognizer('BlinkCardRecognizer'); BlinkID.prototype.BlinkCardRecognizer = BlinkCardRecognizer; +/** + * Result object for BlinkIdCombinedRecognizer. + */ +function BlinkIdCombinedRecognizerResult(nativeResult) { + RecognizerResult.call(this, nativeResult.resultState); + + /** + * The address of the document owner. + */ + this.address = nativeResult.address; + + /** + * The date of birth of the document owner. + */ + this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; + + /** + * The date of expiry of the document. + */ + this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; + + /** + * 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. + */ + this.digitalSignature = nativeResult.digitalSignature; + + /** + * Version of the digital signature. Available only if enabled with signResult property. + */ + this.digitalSignatureVersion = nativeResult.digitalSignatureVersion; + + /** + * Returns true if data from scanned parts/sides of the document match, + * false 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 false. Result will + * be true only if scanned values for all fields that are compared are the same. + */ + this.documentDataMatch = nativeResult.documentDataMatch; + + /** + * The document number. + */ + this.documentNumber = nativeResult.documentNumber; + + /** + * The driver license detailed info. + */ + this.driverLicenseDetailedInfo = nativeResult.driverLicenseDetailedInfo; + + /** + * face image from the document if enabled with returnFaceImage property. + */ + this.faceImage = nativeResult.faceImage; + + /** + * The first name of the document owner. + */ + this.firstName = nativeResult.firstName; + + /** + * full document image if enabled with returnFullDocumentImage property. + */ + this.fullDocumentImage = nativeResult.fullDocumentImage; + + /** + * The full name of the document owner. + */ + this.fullName = nativeResult.fullName; + + /** + * The last name of the document owner. + */ + this.lastName = nativeResult.lastName; + + /** + * Returns true if recognizer has finished scanning first side and is now scanning back side, + * false if it's still scanning first side. + */ + this.scanningFirstSideDone = nativeResult.scanningFirstSideDone; + + /** + * The sex of the document owner. + */ + this.sex = nativeResult.sex; + +} + +BlinkIdCombinedRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); + +BlinkID.prototype.BlinkIdCombinedRecognizerResult = BlinkIdCombinedRecognizerResult; + +/** + * Recognizer which can scan front and back side of the United States driver license. + */ +function BlinkIdCombinedRecognizer() { + Recognizer.call(this, 'BlinkIdCombinedRecognizer'); + + /** + * 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; + + this.createResultFromNative = function (nativeResult) { return new BlinkIdCombinedRecognizerResult(nativeResult); } + +} + +BlinkIdCombinedRecognizer.prototype = new Recognizer('BlinkIdCombinedRecognizer'); + +BlinkID.prototype.BlinkIdCombinedRecognizer = BlinkIdCombinedRecognizer; + +/** + * Result object for BlinkIdRecognizer. + */ +function BlinkIdRecognizerResult(nativeResult) { + RecognizerResult.call(this, nativeResult.resultState); + + /** + * The address of the document owner. + */ + this.address = nativeResult.address; + + /** + * The date of birth of the document owner. + */ + this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; + + /** + * The date of expiry of the document. + */ + this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; + + /** + * The date of issue of the document. + */ + this.dateOfIssue = nativeResult.dateOfIssue != null ? new Date(nativeResult.dateOfIssue) : null; + + /** + * The document number. + */ + this.documentNumber = nativeResult.documentNumber; + + /** + * The driver license detailed info. + */ + this.driverLicenseDetailedInfo = nativeResult.driverLicenseDetailedInfo; + + /** + * face image from the document if enabled with returnFaceImage property. + */ + this.faceImage = nativeResult.faceImage; + + /** + * The first name of the document owner. + */ + this.firstName = nativeResult.firstName; + + /** + * full document image if enabled with returnFullDocumentImage property. + */ + this.fullDocumentImage = nativeResult.fullDocumentImage; + + /** + * The full name of the document owner. + */ + this.fullName = nativeResult.fullName; + + /** + * The last name of the document owner. + */ + this.lastName = nativeResult.lastName; + + /** + * The sex of the document owner. + */ + this.sex = nativeResult.sex; + +} + +BlinkIdRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); + +BlinkID.prototype.BlinkIdRecognizerResult = BlinkIdRecognizerResult; + +/** + * The Blink ID Recognizer is used for scanning Blink ID. + */ +function BlinkIdRecognizer() { + Recognizer.call(this, 'BlinkIdRecognizer'); + + /** + * 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; + + this.createResultFromNative = function (nativeResult) { return new BlinkIdRecognizerResult(nativeResult); } + +} + +BlinkIdRecognizer.prototype = new Recognizer('BlinkIdRecognizer'); + +BlinkID.prototype.BlinkIdRecognizer = BlinkIdRecognizer; + /** * Result object for BruneiIdBackRecognizer. */ @@ -10356,6 +10647,97 @@ NewZealandDlFrontRecognizer.prototype = new Recognizer('NewZealandDlFrontRecogni BlinkID.prototype.NewZealandDlFrontRecognizer = NewZealandDlFrontRecognizer; +/** + * Result object for NigeriaVoterIdBackRecognizer. + */ +function NigeriaVoterIdBackRecognizerResult(nativeResult) { + RecognizerResult.call(this, nativeResult.resultState); + + /** + * The address of Nigeria Voter ID owner. + */ + this.address = nativeResult.address; + + /** + * The date of birth of Nigeria Voter ID owner. + */ + this.dateOfBirth = nativeResult.dateOfBirth != null ? new Date(nativeResult.dateOfBirth) : null; + + /** + * The first name of Nigeria Voter ID owner. + */ + this.firstName = nativeResult.firstName; + + /** + * full document image if enabled with returnFullDocumentImage property. + */ + this.fullDocumentImage = nativeResult.fullDocumentImage; + + /** + * The raw barcode data of Nigeria Voter ID card. + */ + this.rawBarcodeData = nativeResult.rawBarcodeData; + + /** + * The sex of Nigeria Voter ID owner. + */ + this.sex = nativeResult.sex; + + /** + * The surname of Nigeria Voter ID owner. + */ + this.surname = nativeResult.surname; + +} + +NigeriaVoterIdBackRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); + +BlinkID.prototype.NigeriaVoterIdBackRecognizerResult = NigeriaVoterIdBackRecognizerResult; + +/** + * Recognizer which can scan back side of Nigeria voter ID cards. + */ +function NigeriaVoterIdBackRecognizer() { + Recognizer.call(this, 'NigeriaVoterIdBackRecognizer'); + + /** + * Defines if glare detection should be turned on/off. + * + * + */ + this.detectGlare = true; + + /** + * 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 full document image of ID card should be extracted. + * + * + */ + this.returnFullDocumentImage = false; + + this.createResultFromNative = function (nativeResult) { return new NigeriaVoterIdBackRecognizerResult(nativeResult); } + +} + +NigeriaVoterIdBackRecognizer.prototype = new Recognizer('NigeriaVoterIdBackRecognizer'); + +BlinkID.prototype.NigeriaVoterIdBackRecognizer = NigeriaVoterIdBackRecognizer; + /** * Result object for PassportRecognizer. */ @@ -10969,6 +11351,11 @@ function RomaniaIdFrontRecognizerResult(nativeResult) { */ this.address = nativeResult.address; + /** + * The CNP number of Romania ID owner. + */ + this.cnpNumber = nativeResult.cnpNumber; + /** * The date of expiry of Romania ID. */ @@ -12594,6 +12981,11 @@ function SloveniaCombinedRecognizerResult(nativeResult) { */ this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; + /** + * Determines if date of expiry of Slovenian ID card is permanent. + */ + this.dateOfExpiryPermanent = nativeResult.dateOfExpiryPermanent; + /** * The date of issue of the Slovenia ID card. */ @@ -12939,6 +13331,11 @@ function SloveniaIdFrontRecognizerResult(nativeResult) { */ this.dateOfExpiry = nativeResult.dateOfExpiry != null ? new Date(nativeResult.dateOfExpiry) : null; + /** + * Determines if date of expiry of Slovenian ID card is permanent. + */ + this.dateOfExpiryPermanent = nativeResult.dateOfExpiryPermanent; + /** * face image from the document if enabled with returnFaceImage property. */ diff --git a/README.md b/README.md index 0e94670..7093f2d 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ cp -f -r /www/js ./www/ Add Android platform support to the project: - cordova platform add android@7 + cordova platform add android@8 ### iOS diff --git a/Release notes.md b/Release notes.md index d62201d..a26db14 100644 --- a/Release notes.md +++ b/Release notes.md @@ -1,3 +1,6 @@ +## 4.10.0 +- Updated to [Android SDK v4.10.0](https://github.com/BlinkID/blinkid-android/releases/tag/v4.10.0) and [iOS SDK v4.10.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v4.10.0) + ## 4.9.0 - Updated to [Android SDK v4.9.0](https://github.com/BlinkID/blinkid-android/releases/tag/v4.9.0) and [iOS SDK v4.9.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v4.9.0) diff --git a/www/js/index.js b/www/js/index.js index 9d6dffb..1757258 100644 --- a/www/js/index.js +++ b/www/js/index.js @@ -82,8 +82,8 @@ var app = { // package name/bundleID com.microblink.blinkid var licenseKeys = { - android: 'sRwAAAAWY29tLm1pY3JvYmxpbmsuYmxpbmtpZJ9ew00uWSf86/ux5PUoKjyTpOK/Xi9t7cx7ZuiLoN86RhkY28pvSxf0MuuwpIa3oFeAFWqNOB+joH0zcxSCfOp5wSZFvatFB0TFDUubaP6X+iJQtok7/qx3Ioy503yXeyQPJG/Grr510Gh3q4n1kgy+U3ZEsYusp/UN8CdExK/+gW2UL5d3iKzqNeAonpVDPS3B70fRUcm8abLqxYyjSjZp/1Pum4Fdye7AlcGXnv3vnB2O7g4LrJ419mNaOg==', - ios: 'sRwAAAEWY29tLm1pY3JvYmxpbmsuYmxpbmtpZFG2rW9X4lA0y++ptbiZ7dj1E80ExjC//oFNqdO1aP3BzyX/8qAoWiV5mCPgIIDWRIXc2UdU0OrG+6/mEPb2u6EGhxMIXonSGsd8WICdxSV+baMRJck21qyZoCgRwz+eC0MXrTaPt1jqWVKHjYT7BvPaC8p+EV8RY6Vph89PLKDZxsvxM93HVFB7cah4xN12S6gNrtm25aIMEbpBInI40zmtpCBGoU8KR3U21A8spXVHZyGcGsG3guOSsqpsNg==' + android: 'sRwAAAAWY29tLm1pY3JvYmxpbmsuYmxpbmtpZJ9ew00uWSf86/ux5PMILDweFVtiSUuS9RpUrbS9T3sxyqumJNvZZhmynJpMO4OuGMKlnucFqJ64Z48OKBDe0QEY85+CL6lcNBEuAENW3uLPzXzhwBllRcQfayC7S31nJs70sVYw1F0kodv04h+X1FJnG+fpX36GpLpVjWLzB7rqadCwwD/F/q1syNgg5CV4BwvBMFZPVy37c/GLNJofkla743XEZcu7BkFmOpc8z+iJjhumShIkRj+kxkj1PIliYWdf', + ios: 'sRwAAAEWY29tLm1pY3JvYmxpbmsuYmxpbmtpZFG2rW9X4lA0y++ptb7JSX2pZqBhfkJPY+Nc73d/DXvmJjYPpTI9gs1bIZClQM9Tb2XiaTCaSdwRGrUcroJtcUOUKa6IHo8HvMtCHNCBeKscEWsdsJvxax5+Y21iThnttfy6B86tarhF1rZgnA6Af3AjihUTr59jBS1b5MGU39PWPXyMYkN12NvvNTOA89f/T0K+f4czxmdFn//edElIemomdeqyBb1OYZXfSirvxPJ1ErU9TuPoSs0Ub8MhRm4VDFtM' }; scanButton.addEventListener('click', function() {