Skip to content

Commit

Permalink
Merged in feature/release-1.3.0 (pull request #11)
Browse files Browse the repository at this point in the history
Feature/release 1.3.0
  • Loading branch information
Juraj Fulir committed Oct 20, 2017
2 parents b69fe9c + 6dd6f89 commit af37d7c
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 29 deletions.
Empty file removed .gitmodules
Empty file.
2 changes: 1 addition & 1 deletion BlinkID/initIOSFramework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ ! -d 'blinkid-ios' ] ; then

echo "Cloning repo with Microblink framework v${VERSION}"
# clone blinkID repository
# git clone "[email protected]:BlinkID/blinkid-ios.git"
git clone "[email protected]:BlinkID/blinkid-ios.git"
cd blinkid-ios
git checkout "v${VERSION}"

Expand Down
2 changes: 1 addition & 1 deletion BlinkID/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blinkid",
"version": "1.1.4",
"version": "1.3.0",
"description": "A small and powerful ID card scanning library",
"cordova": {
"id": "com.microblink.blinkid",
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.microblink.BlinkIdScanner"
version="1.1.3">
version="1.3.0">

<name>BlinkIdScanner</name>
<description>A small and powerful ID card scanning library</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -90,13 +81,28 @@ cordova create <path> <package> <name>

> 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
cd <path_to_your_project>
cordova plugin add <blinkID_plugin_path>
```

**Ionic specific:**

Copy the BlinkID plugin's JavaScript files to your project:
```shell
cp -f -r <blinkID_plugin_path>/www/js ./www/
```

### Android

Add Android platform support to the project:
Expand All @@ -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

Expand All @@ -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).
Expand Down Expand Up @@ -325,14 +327,16 @@ 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`.


## 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.
4 changes: 4 additions & 0 deletions Release notes.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion initCordovaDemoApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit af37d7c

Please sign in to comment.