diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000 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}" 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 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; } 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. 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) 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"