From 952facbca0af04fc42615c8110786d8f59544a83 Mon Sep 17 00:00:00 2001 From: Juraj Fulir Date: Fri, 20 Oct 2017 16:05:33 +0200 Subject: [PATCH 1/7] Change 'cd' destination in Cordova init script --- initCordovaDemoApp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initCordovaDemoApp.sh b/initCordovaDemoApp.sh index a417a0f..ed4f127 100755 --- a/initCordovaDemoApp.sh +++ b/initCordovaDemoApp.sh @@ -20,7 +20,7 @@ rm -rf $APP_NAME cordova create $APP_NAME com.microblink.blinkid $APP_NAME # enter into demo project folder -cd BlinkIdDemo +cd $APP_NAME # add the BlinkID plugin cordova plugin add ../BlinkID --variable CAMERA_USAGE_DESCRIPTION="Camera permission is required for automated scanning" From 38be182f8c050f4a1e8872dc3e517922e5159c12 Mon Sep 17 00:00:00 2001 From: Juraj Fulir Date: Fri, 20 Oct 2017 16:05:46 +0200 Subject: [PATCH 2/7] Remove .gitmodules --- .gitmodules | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000 From 1d12e87d993997ce1621602a728074dd6ee254af Mon Sep 17 00:00:00 2001 From: Juraj Fulir Date: Fri, 20 Oct 2017 16:06:40 +0200 Subject: [PATCH 3/7] Remove commented support for USDL's code128 for android --- .../java/com/phonegap/plugins/blinkid/BlinkIdScanner.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/BlinkID/src/android/java/com/phonegap/plugins/blinkid/BlinkIdScanner.java b/BlinkID/src/android/java/com/phonegap/plugins/blinkid/BlinkIdScanner.java index b090d63..d0e8ac5 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/blinkid/BlinkIdScanner.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/blinkid/BlinkIdScanner.java @@ -358,11 +358,7 @@ private USDLRecognizerSettings buildUsdlSettings() { // surrounding it (e.g. text concatenated with barcode). This option can significantly // increase recognition time. Default is true. usdl.setNullQuietZoneAllowed(true); - // Some driver's licenses contain 1D Code39 and Code128 barcodes alongside PDF417 barcode. - // These barcodes usually contain only reduntant information and are therefore not read by - // default. However, if you feel that some information is missing, you can enable scanning - // of those barcodes by setting this to true. - // usdl.setScan1DBarcodes(true); + return usdl; } From 3b244ec8938e637db7fcae7742a70cd77913f729 Mon Sep 17 00:00:00 2001 From: Juraj Fulir Date: Fri, 20 Oct 2017 16:07:05 +0200 Subject: [PATCH 4/7] Fix iOS framework init script --- BlinkID/initIOSFramework.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BlinkID/initIOSFramework.sh b/BlinkID/initIOSFramework.sh index 27996ea..766356d 100755 --- a/BlinkID/initIOSFramework.sh +++ b/BlinkID/initIOSFramework.sh @@ -10,7 +10,7 @@ if [ ! -d 'blinkid-ios' ] ; then echo "Cloning repo with Microblink framework v${VERSION}" # clone blinkID repository - # git clone "git@github.com:BlinkID/blinkid-ios.git" + git clone "git@github.com:BlinkID/blinkid-ios.git" cd blinkid-ios git checkout "v${VERSION}" From dac21fbfbf8779965209911b13ac87e03387cf8e Mon Sep 17 00:00:00 2001 From: Juraj Fulir Date: Fri, 20 Oct 2017 16:29:47 +0200 Subject: [PATCH 5/7] Update README --- README.md | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index b8b4edf..a66c853 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,12 @@ After installation, don't forget to restart the terminal! Downloading a repository just downloads the files from the most recent commit of the default branch but without all the dependencies which are in submodules. We recommend that you clone directory. With a clone option you will get a copy of the history and it’s functional git repository. To clone repository: -+ **Copy URL from Clone or download button: https://github.com/BlinkID/blinkid-phonegap.git** ++ **Copy URL from the `Clone or download` button: https://github.com/BlinkID/blinkid-phonegap.git** + **Open terminal on Mac/Linux or [GitBash](https://git-for-windows.github.io/) on Windows.** + **cd into directory where you want the cloned directory to be made.** + **Type `git clone ` , than past URL** + **Press enter** - -## Submodules -After cloning repository, make sure you clone also its submodules: - -```shell -git submodule init -git submodule update -``` - ## How to get started ### Cordova @@ -90,6 +81,14 @@ cordova create > The shown instructions are for **Cordova**, the instructions for **Ionic** and **PhoneGap** are practically the same, except for some slight command line argument differences. +Initialize the iOS framework: + +```shell +cd BlinkID +./initIOSFramework.sh +cd .. +``` + Add the **BlinkID** plugin to your project: ```shell @@ -97,6 +96,13 @@ cd cordova plugin add ``` +**Ionic specific:** + +Copy the BlinkID plugin's JavaScript files to your project: +```shell +cp -f -r /www/js ./www/ +``` + ### Android Add Android platform support to the project: @@ -117,10 +123,6 @@ Here's a complete example of how to create and build a project for **Android** a # pull the plugin and sample application from Github git clone https://github.com/BlinkID/blinkid-phonegap.git -# initialize and update submodules -git submodule init -git submodule update - # create a empty application cordova create testcordova @@ -142,12 +144,12 @@ cordova platform add ios cordova build ios ``` -In **phonegap** CLI instead of "platform add" just request a build for the platform using "build android" or "build ios". You will have to do the manual steps described above to be able to do a successfull build. +In **phonegap** CLI instead of `platform add` just request a build for the platform using `build android` or `build ios`. You will have to do the manual steps described above to be able to do a successfull build. You can also use provided `initDemoApp.sh` script that will generate a demo app that uses the plugin: ```shell -./initDemoApp.sh +./initCordovaDemoApp.sh ``` To run the script, you'll need BASH environment on Windows (Linux and MacOS use BASH by default). @@ -325,9 +327,9 @@ scanButton.addEventListener('click', function() { + **MyKad** - scans the front of Malaysian ID cards + On returned result, image can also be returned (under "resultImage" field) as base64 string of JPEG image. Type of returned image is specified as second argument and can be: - + "IMAGE_NONE" - No image will be returned - + "IMAGE_SUCCESSFUL_SCAN" - Whole input image which returned the result. - + "IMAGE_CROPPED" - Cropped and dewarped image of scanned object. For example, ID recognizers will return cropped and dewarped image of ID + + `IMAGE_NONE` - No image will be returned + + `IMAGE_SUCCESSFUL_SCAN` - Whole input image which returned the result. + + `IMAGE_CROPPED` - Cropped and dewarped image of scanned object. For example, ID recognizers will return cropped and dewarped image of ID + All license parameters must be provided (for **iOS** and **Android**) even if you do not plan to run the application on both platforms. The licenses that you do not have/use must be set to `null`. @@ -335,4 +337,6 @@ scanButton.addEventListener('click', function() { ## Changing scanner settings -To change scanner settings you need to modify Phonegap plugin classes for iOS and Android. Plugin classes are located in ./BlinkID/src . All necessary settings documentation is located in those source files. +To change scanner settings you need to modify Phonegap plugin classes for iOS and Android. Plugin classes are located in `./BlinkID/src`. All necessary settings documentation is located in those source files. + +For platform specific implementation details refer to the [BlinkID-iOS](https://github.com/BlinkID/blinkid-ios) and [BlinkID-android](https://github.com/BlinkID/blinkid-android) documentation. From c0fa1d7ed435dbe8b4f0280b86237cffc1781a22 Mon Sep 17 00:00:00 2001 From: Juraj Fulir Date: Fri, 20 Oct 2017 16:33:29 +0200 Subject: [PATCH 6/7] Update version numbers --- BlinkID/package.json | 2 +- BlinkID/plugin.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BlinkID/package.json b/BlinkID/package.json index 3d63dcf..7cfc127 100644 --- a/BlinkID/package.json +++ b/BlinkID/package.json @@ -1,6 +1,6 @@ { "name": "blinkid", - "version": "1.1.4", + "version": "1.3.0", "description": "A small and powerful ID card scanning library", "cordova": { "id": "com.microblink.blinkid", diff --git a/BlinkID/plugin.xml b/BlinkID/plugin.xml index 4545592..9ee593f 100644 --- a/BlinkID/plugin.xml +++ b/BlinkID/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.0"> BlinkIdScanner A small and powerful ID card scanning library From 6dd6f89ed2405d923046957467b9e9353f1741f0 Mon Sep 17 00:00:00 2001 From: Juraj Fulir Date: Fri, 20 Oct 2017 16:34:05 +0200 Subject: [PATCH 7/7] Update Release notes --- Release notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Release notes.md b/Release notes.md index 404732c..801b52a 100644 --- a/Release notes.md +++ b/Release notes.md @@ -1,3 +1,7 @@ +## 1.3.0 +- updated support for Ionic v3 +- replaced BlinkID iOS submodule dependency with cococapods dependency + ## 1.2.0 - replaced BlinkID Android submodule dependency with Maven dependency - updated Android SDK to [v3.11.0](https://github.com/BlinkID/blinkid-android/releases/tag/v3.11.0)