Skip to content

Commit

Permalink
Merged in feature/upgradeCordovaTo7/AND-198 (pull request #12)
Browse files Browse the repository at this point in the history
Feature/upgradeCordovaTo7/AND-198

Approved-by: Juraj Fulir <[email protected]>
  • Loading branch information
Juraj Fulir committed Dec 13, 2017
2 parents c123748 + 4f5c284 commit aa14bd4
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 17 deletions.
2 changes: 1 addition & 1 deletion BlinkID/initIOSFramework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ VERSION='2.14.0'
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 "https://github.com/BlinkID/blinkid-ios.git"
fi

echo "Checking out v${VERSION}"
Expand Down
4 changes: 2 additions & 2 deletions BlinkID/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blinkid",
"version": "1.3.0",
"version": "1.4.1",
"description": "A small and powerful ID card scanning library",
"cordova": {
"id": "com.microblink.blinkid",
Expand All @@ -26,7 +26,7 @@
},
{
"name": "cordova-android",
"version": ">=4.0.0"
"version": ">=7.0.0"
},
{
"name": "cordova-ios",
Expand Down
18 changes: 9 additions & 9 deletions 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.3.0">
version="1.4.1">

<name>BlinkIdScanner</name>
<description>A small and powerful ID card scanning library</description>
Expand All @@ -11,8 +11,8 @@
<author>MicroBlink Team [email protected]</author>

<engines>
<engine name="cordova" version=">=3.0.0" />
<engine name="cordova-android" version=">=4.0.0" />
<engine name="cordova" version=">=7.0.0" />
<engine name="cordova-android" version=">=7.0.0" />
</engines>

<js-module src="www/blinkIdScanner.js" name="BlinkIdScanner">
Expand All @@ -28,7 +28,7 @@
</feature>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<config-file target="app/src/main/AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />

Expand All @@ -44,7 +44,7 @@
android:smallScreens="true" />
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest/application">
<config-file target="app/src/main/AndroidManifest.xml" parent="/manifest/application">
<activity
android:name="com.microblink.activity.ScanCard"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
Expand All @@ -54,11 +54,11 @@
</config-file>


<source-file src="src/android/java/com/phonegap/plugins/blinkid/BlinkIdScanner.java" target-dir="src/com/phonegap/plugins/blinkid" />
<source-file src="src/android/java/com/phonegap/plugins/blinkid/FakeR.java" target-dir="src/com/phonegap/plugins/blinkid" />
<source-file src="src/android/java/com/phonegap/plugins/blinkid/BlinkIdScanner.java" target-dir="app/src/main/java/com/phonegap/plugins/blinkid" />
<source-file src="src/android/java/com/phonegap/plugins/blinkid/FakeR.java" target-dir="app/src/main/java/com/phonegap/plugins/blinkid" />

<source-file src="src/android/res/raw/beep.mp3" target-dir="res/raw" />
<source-file src="src/android/res/layout/splash_screen.xml" target-dir="res/layout" />
<source-file src="src/android/res/raw/beep.mp3" target-dir="app/src/main/res/raw" />
<source-file src="src/android/res/layout/splash_screen.xml" target-dir="app/src/main/res/layout" />

<framework src="src/android/libBlinkID.gradle" custom="true" type="gradleReference" />

Expand Down
2 changes: 1 addition & 1 deletion BlinkID/scripts/fix-largeheap.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = function(ctx) {
deferral = ctx.requireCordovaModule('q').defer();

var platformRoot = path.join(ctx.opts.projectRoot, 'platforms/android');
var androidManifest = path.join(platformRoot, 'AndroidManifest.xml');
var androidManifest = path.join(platformRoot, 'app/src/main/AndroidManifest.xml');

console.log("BlinkID after_prepare hook: ");
fs.stat(androidManifest, function(err, stats) {
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

This repository contains example wrapper for BlinkID native SDKs ([iOS](https://github.com/BlinkID/blinkid-ios) and [Android](https://github.com/BlinkID/blinkid-android)). Not all features of native SDKs are available in PhoneGap wrapper. However, the wrapper is open source, so you can easily add features that you need. For 100% of features and maximum control, consider using native SDKs.

## Cordova version
BlinkID PhoneGap requires Cordova **v7.0.0 or later** and cordova-android plugin **v7.0.0 or later**.

## Dependencies
MicroBlink.framework/MicroBlink file in iOS submodule exceeds GitHubs limited file size of 100MB.
To correctly init the submodule Git LFS is needed. Git LFS can be installed with homebrew:
Expand Down Expand Up @@ -107,7 +110,7 @@ cp -f -r <blinkID_plugin_path>/www/js ./www/

Add Android platform support to the project:

cordova platform add android
cordova platform add android@7

### iOS

Expand All @@ -132,7 +135,7 @@ cd testcordova
cordova plugin add ../blinkid-phonegap/BlinkID

# add android support to the project
cordova platform add android
cordova platform add android@7

# build the project, the binary will appear in the bin/ folder
cordova build android
Expand Down
6 changes: 6 additions & 0 deletions Release notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.4.1
- upgraded support for Cordova v7.0.0 or higher
- upgraded support for Cordova Android platform v7.0.0 or higher
* sources for Android are now compliant with the Android Studio project structure
- replaced the SSH link with the HTTPS link in the iOS init script (solves `public-key denied` issues)

## 1.4.0
- updated Android SDK to [v3.13.0](https://github.com/BlinkID/blinkid-android/releases/tag/v3.13.0)
- updated iOS SDK to [v2.14.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v2.14.0)
Expand Down
2 changes: 1 addition & 1 deletion initCordovaDemoApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd $APP_NAME
cordova plugin add ../BlinkID --variable CAMERA_USAGE_DESCRIPTION="Camera permission is required for automated scanning"

# add ios and android support to the project
cordova platform add android
cordova platform add android@7
cordova platform add ios

# copy content of the www folder
Expand Down
2 changes: 1 addition & 1 deletion initIonicDemoApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sed -i "" "s/MyApp/$APP_NAME/" config.xml
ionic cordova plugin add ../BlinkID

# add ios and android support to the project
ionic cordova platform add android
ionic cordova platform add android@7
ionic cordova platform add ios

# copy content of the www folder
Expand Down

0 comments on commit aa14bd4

Please sign in to comment.