blinkid / blinkid-cordova Goto Github PK
View Code? Open in Web Editor NEWID scanning for cross-platform apps built with Cordova and Phonegap.
ID scanning for cross-platform apps built with Cordova and Phonegap.
please develop a plugin for Nativescript as it's one of the popular framework for native mobile app development
Works fine on iOS - cannot get this to work on android.
When adding the plugin:
[Error during processing of action! Attempting to revert...
Failed to install 'blinkid-cordova': TypeError [ERR_INVALID_ARG_TYPE]: Uh oh!
The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at Object.resolve (path.js:1090:7)]
Hello!
Thanks for this plugin, the demo works great(blinkID ios app from app store). However, I tried to implement it in my app with no success. The issue is that when I place the drivers license in the frame to scan, it's simply not scanning at all. Nothing happens. I tried tapping the screen that doesn't work either. I don't get any errors either. Im a bit lost here. Any help would be gladly appreciated. The following is the code snippet i'm using.
const types = ["USDL"];
const imageTypes = ["IMAGE_FACE"]
const licenseKey = 'T3NW7MAE-KEX4X2OO-QKL2MZ5Q-JT5TK45F-SQWSKFKU-YQFTHSTI-6V6DBRMD-RA2QJHMV'
window['cordova'].plugins.blinkIdScanner.scan((result) => {
console.log(result)
}, (err) => console.log(err), types, imageTypes, licenseKey, null, 'en')
During build using PhoneGap Build, plugin fails to install. This may be related to issue #60, but since this is downloading from NPM by PhoneGap, I don't have the freedom to change the case.
Hi,
i am currently developing a cordova application with your plugin. On android everything works fine, however when i'm trying to scan on IOS, the whole application crashes. If i enable an exception breakpoint in , i get the following message:
2016-11-08 16:02:15.029 Betterbank[2430:2517156] *** Assertion failure in -[PPResourceManager loadDictionaryAndConfusions], /Users/dino/MicroBlink/Workspace/BlinkID/blinkid-ios-demo/blinkid-ios-framework/core-ios/CommonFramework/Services/PPResourceManager.mm:508
i'm clueless at this point. Do you have any suggestions ?
Thanks in advance
Hi great library, thanks for your work.
When running
cordova platform add android
I'm getting the error
Error: Uh oh! "<my-project-path>/testcordova/plugins/com.microblink.BlinkIdScanner/src/android/blinkid-android/beep.mp3" not found!
The ionic cordova platform add ios
command cannot find CDVblinkIdScanner.m.
This happens when following the guidance of the documentation in the README. I used the init script to create a sample blank app, add the cordova plugin, then the android platform, and then the ios platform. On adding the ios platform I received the following error:
$ ionic cordova platform add ios
> cordova platform add ios --save
Using cordova-fetch for cordova-ios@~4.4.0
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: io.veti.alphaapp
Name: AlphaApp
iOS project created with [email protected]
Installing "com.microblink.BlinkIdScanner" for ios
Error during processing of action! Attempting to revert...
Failed to install 'com.microblink.BlinkIdScanner': Error
at copyFile (/Users/kent/git/veti/cordova-plugins/blinkid-phonegap/AlphaApp/platforms/ios/cordova/lib/plugman/pluginHandlers.js:319:36)
at copyNewFile (/Users/kent/git/veti/cordova-plugins/blinkid-phonegap/AlphaApp/platforms/ios/cordova/lib/plugman/pluginHandlers.js:351:5)
at installHelper (/Users/kent/git/veti/cordova-plugins/blinkid-phonegap/AlphaApp/platforms/ios/cordova/lib/plugman/pluginHandlers.js:269:13)
at install (/Users/kent/git/veti/cordova-plugins/blinkid-phonegap/AlphaApp/platforms/ios/cordova/lib/plugman/pluginHandlers.js:35:13)
at ActionStack.process (/Users/kent/git/veti/cordova-plugins/blinkid-phonegap/AlphaApp/platforms/ios/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
at PluginManager.doOperation (/Users/kent/git/veti/cordova-plugins/blinkid-phonegap/AlphaApp/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:117:20)
at PluginManager.addPlugin (/Users/kent/git/veti/cordova-plugins/blinkid-phonegap/AlphaApp/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:147:17)
at Api.addPlugin (/Users/kent/git/veti/cordova-plugins/blinkid-phonegap/AlphaApp/platforms/ios/cordova/Api.js:235:10)
at handleInstall (/usr/local/opt/nvm/versions/node/v8.2.1/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:619:6)
at /usr/local/opt/nvm/versions/node/v8.2.1/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:379:28
Error: Uh oh!
"/Users/kent/git/veti/cordova-plugins/blinkid-phonegap/AlphaApp/plugins/com.microblink.BlinkIdScanner/src/ios/sources/CDVblinkIdScanner.m" not found!
[ERROR] Exception:
After I manually added the files from BlinkID/src/ios/sources to my projects plugins/com.microblink.BlinkIdScanner/src/ios/sources directory then adding the ios platform worked. The plugins/com.microblink.BlinkIdScanner/src/ios/sources directory did not exist after I installed the plugin and I had to manually create it.
Will you fix this so that I can add the ios platform normally?
Is there any way to remove or change Microblink logo that is appearing on sdk intialization ?
I tried to add intent.putExtra(ScanCard.EXTRAS_SPLASH_SCREEN_LAYOUT_RESOURCE, fakeR.getId("raw", "test"));
directly in BlinkIdScanner.java file located in generated plugins directory, but no luck at all.
Thanks !
According to the blinkid-android documentation, to add support for scanning Indonesian ID cards, there are 2 relevant code snippets:
private RecognizerSettings[] setupSettingsArray() {
IndonesianIDFrontRecognizerSettings sett = new IndonesianIDFrontRecognizerSettings();
// now add sett to recognizer settings array that is used to configure
// recognition
return new RecognizerSettings[] { sett };
}
@Override
public void onScanningDone(RecognitionResults results) {
BaseRecognitionResult[] dataArray = results.getRecognitionResults();
for(BaseRecognitionResult baseResult : dataArray) {
if(baseResult instanceof IndonesianIDFrontRecognitionResult) {
IndonesianIDFrontRecognitionResult result = (IndonesianIDFrontRecognitionResult) baseResult;
// you can use getters of IndonesianIDFrontRecognitionResult class to
// obtain scanned information
if(result.isValid() && !result.isEmpty()) {
String name = result.getName();
String placeOfBirth = result.getPlaceOfBirth();
} else {
// not all relevant data was scanned, ask user
// to try again
}
}
}
}
Are we supposed to add them to the BlinkIdScanner.java
file in src
? Then what modifications are needed on the Javascript side to make it work?
Here is how to reproduce the error:
cordova create blink com.acme.blink blink
cd blink
cordova platform add android
cordova plugin add cordova-plugin-qrscanner
cordova plugin add blinkid-cordova
cordova run android
And it fails with
Element uses-permission#android.permission.CAMERA at AndroidManifest.xml:21:5-65 duplicated with element declared at AndroidManifest.xml:15:5-90
/home/....../platforms/android/app/src/main/AndroidManifest.xml:23:5-60 Error:
Element uses-feature#android.hardware.camera at AndroidManifest.xml:23:5-60 duplicated with element declared at AndroidManifest.xml:16:5-85
/home/......../platforms/android/app/src/main/AndroidManifest.xml Error:
Validation failed, exiting
Hi,
I am not able to scan the Malaysian iKad cards.
I defined typed as below.
var types = ["IKad","USDL", "MRTD", "Barcode", "MyKad" ];
After running in device, getting error as follows "Error : Recognizer type not supported: IKad".
Kindly help me to resolve the issue.
In Iphone Screen is not auto rotating, and i want to customize the message below overlay.
Thanks
When running initIOSFramework.sh,
Received
blinkid-ios.zip 100%[===================>] 59.20M 797KB/s in 1m 58s
2018-04-16 23:06:13 URL:https://github-production-release-asset-2e65be.s3.amazonaws.com/25380381/86ca4036-38d9-11e8-8c7a-ea3647eb4158?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180416%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180416T160413Z&X-Amz-Expires=300&X-Amz-Signature=0e2669d5f15bde4c6845003d0b23ec33f7b189bf0b76917e0bf3bf4f436677d2&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dblinkid-ios_v2.17.0.zip&response-content-type=application%2Foctet-stream [62076791/62076791] -> "blinkid-ios.zip" [1]
Unzipping blinkid-ios.zip
Unzipped blinkid-ios.zip
mv: rename Microblink.framework to ../Microblink.framework: No such file or directory
mv: rename Microblink.bundle to ../Microblink.bundle: No such file or directory
Removing unnecessary files
Hi,
I'm trying to clone the project for android as listed below
- mkdir DEMO
- cd DEMO
- git clone https://github.com/BlinkID/blinkid-phonegap.git
- cd blinkid-phonegap
- git submodule init
- git submodule update
but when executing the git submodule update
i'm getting the error like Host key verification failed. fetal: Could not read from remote repository
For other details please refer the attached screenshot
Can you please suggest me how to clone the project successfully
I need to scan with my front camera, is blinkid provides this kind of functionality to change the camera ?
I am Working On Ionic V3 Project which has many other plugins and most of them not supported "cordova-android" version=">=7.0.0"
what should i do to use this plugin without upgrading
According to the sample present in www, I am adding DocumentFace as types
/**
* Use these scanner types
* Available: "PDF417", "USDL", "Barcode", "MRTD", "EUDL", "UKDL", "DEDL", "MyKad", "DocumentFace"
*/
var types = ["PDF417", "UKDL", "MRTD", "Barcode","DocumentFace"];
this is opening a dialog box with Error: Recognizer type not supported: DocumentFace.
I am new to Blink Id and also not able to find proper document regarding this.
I wanted to scan the passport and also need the image from it.
Please suggest.
Hello!
Tell me please whether this plugin can scan the front side for ID cards?
When testing the BlinkID demo app, we're seeing this error when the BlinkID plugin attempts to load, which prevents the device from initializing:
NSURLConnection finished with error - code -1100
For debug purposes, we've tried setting "Allow Arbitrary Loads" in the App Transport Security, as well as adding the domains "github.com" and "microblink.com" to Exception Domains.
We're using Xcode 10 with the legacy build setting and Cordova version 8.1.2. The error is seen both when testing on Xcode iPad simulator as well an actual iPad device. (Using the exact same setup, the BlinkID PDF417 Cordova plugin deployed successfully.)
the ionicDemo script does not generate an app.module.ts. So it does not build.
I am trying to integrate barcode along with other card types, all other card recognizers are working fine except BarcodeRecognizer,
Following is the sample code,
var recognizer = new (<any>window).cordova.plugins.BlinkID.BarcodeRecognizer();
var SuccessFrameGrabber = new (<any>window).cordova.plugins.BlinkID.SuccessFrameGrabberRecognizer(recognizer);
var barcodeOverlaySettings = new (<any>window).cordova.plugins.BlinkID.BarcodeOverlaySettings();
var recognizerCollection = new (<any>window).cordova.plugins.BlinkID.RecognizerCollection([SuccessFrameGrabber]);
(<any>window).cordova.plugins.BlinkID.scanWithCamera(
function callback(cancelled) {
// handle cancelled scanning
if (cancelled) {
console.log("is cancelled!!");
return;
}
console.log(recognizer.result);
},
function errorHandler(err) {
console.log(err);
},barcodeOverlaySettings, recognizerCollection, licenseKeys );
Please help !
I am using the UsdlCombinedRecognizer but it has no response for scanning the front. It only has response for scanning the back.
Not sure why you keep changing the scan method in the js. Like in the latest version the scan method requires and array of image types instead of one. This breaks previous versions. It would be better to add a new method with the newest functionality. As a hack to sense the new code I'm running
cordova.plugins.blinkIdScanner.scan.toString().indexOf('imageTypes') > -1
You should have at least added a check to the js to fix the compatibility
BlinkIdScanner.prototype.scan = function (successCallback, errorCallback, types, imageTypes, licenseiOs, licenseAndroid, language) {
if (errorCallback == null) {
errorCallback = function () {
};
}
if (typeof errorCallback != "function") {
console.log("BlinkIdScanner.scan failure: failure parameter not a function");
return;
}
if (typeof successCallback != "function") {
console.log("BlinkIdScanner.scan failure: success callback parameter must be a function");
return;
}
if(type imageTypes == 'string') {
if(imageTypes == 'IMAGE_CROPPED')
imageTypes = 'IMAGE_DOCUMENT';
imageTypes = [imageTypes];
}
exec(successCallback, errorCallback, 'BlinkIdScanner', 'scan', [types, imageTypes, licenseiOs, licenseAndroid, language]);
};
Getting Uncaught TypeError: Cannot read property 'blinkIdScanner' of undefined at HTMLButtonElement. error in index.js:79 line. Can you please check it once
Hi,
Ive been trying to get this plugin working within our Angular2/Ionic 2 application, but been having some problems.
The plugin doesnt like the registration key, and returns 'License Key Error'.
I have now simplified the problem, down to a license key issue...
a) We can build and deploy the demo as provided 'BlinkIdDemo', and it runs with no problems.
b) Change the Demo Package Id to one of ours, and use the generated keys from the portal, we get 'Un Licensed'/Key Failure..
I think it seems the Phonegap/cordova version is not reading the package name or license key correctly, and in some way 'hard coded' ?
Has anybody else had success in deploying this and reeplacing the license key ?
Best
E ScanCard.java:338@main: INVALID LICENCE KEY 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: com.microblink.recognition.InvalidLicenceKeyException: Failed to validate licence key. Reason: Either license key or android context is null! 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at com.microblink.view.recognition.RecognizerView.setLicenseKey(line:746) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at com.microblink.activity.BaseScanActivity.onCreate(line:333) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at android.app.Activity.performCreate(Activity.java:6876) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at android.app.ActivityThread.access$1100(ActivityThread.java:221) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at android.os.Handler.dispatchMessage(Handler.java:102) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at android.os.Looper.loop(Looper.java:158) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at android.app.ActivityThread.main(ActivityThread.java:7224) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at java.lang.reflect.Method.invoke(Native Method) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 10-31 19:16:14.312 20974 20974 E ScanCard.java:338@main: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Hello,
Is there any way to trigger scan on the front of US ID.
I dont need data from it, only the cropped image object.
I see that MRTD works perfectly fine with EU ID cards but i cant seem to find option for US Cards.
Is it a limitation on the phonegap wrapper, because from what i understand from the overview in the website there is a way to scan ID with or without MRZ (Machine-Readable Zone) or barcode.
Thanks !
Before I start I would like to congratulate you for your great work.
This code below is your own sample for building android and ios
# pull the plugin and sample application from Github
git clone [email protected]:BlinkID/blinkid-phonegap.git
# initialize and update submodules
git submodule init
git submodule update
...
$ git clone [email protected]:BlinkID/blinkid-phonegap.git
Cloning into 'blinkid-phonegap'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Then I did it in my own way through HTTPS
and it works great with ANDROID
git clone https://github.com/BlinkID/blinkid-phonegap.git
git submodule init
git submodule update
cordova plugin add ../plugins_downloaded/blinkid-phonegap/BlinkID
ionic platform rm android
ionic platform add android
ionic build android
Than, i tried to build it for iOS before using XCODE for publishing.
I had the same problem as ANDROID.
I had to clone the repo through HTTPS
git clone https://github.com/BlinkID/blinkid-phonegap.git
cd ./plugins_downloaded/blinkid-phonegap/BlinkID/src/ios
git submodule init
git submodule update
git clone https://github.com/BlinkID/blinkid-ios.git ------> the submodule too
cordova plugin add ./plugins_downloaded/blinkid-phonegap/BlinkID/
Now, for iOS I can scan but i dont see the result.
The Camera close after scanning with nothing in the callback.
function scanBlinkId() {
...
//scanButton.addEventListener('click', function() {
cordova.plugins.blinkIdScanner.scan(
// Register the callback handler
function callback(scanningResult) {
The only log i see in Xcode is
THREAD WARNING: ['BlinkIdScanner'] took '10.166748' ms. Plugin should use a background thread.
[W] -[PPCameraManager updateCameraSession] [PPCameraManager.mm:244] 201 Should not have been observing autofocus
Please Help
Through our test cases:
Please let me know, if you have any query related to above points.
I get the following error on prepare or build. I have tracked down the issue in IOS
Could not parse project.pbxproj: SyntaxError: Expected "/* Begin ", "/* End ", """, or [A-Za-z0-9_.] but "/" found.
In the main projects project.pbxproj file are the following entries for micro blink
Notice one is missing an inital hash value. removing the line stops the error
3B343CEC3B06493CBADD151A /* MicroBlink.framework in Frameworks / = {isa = PBXBuildFile; fileRef = 8F702B9E9150485F8070A8F5 / MicroBlink.framework /; };
1E7B72F9C7B14E49BC58E8F0 / MicroBlink.framework in Embed Frameworks / = {isa = PBXBuildFile; fileRef = 8F702B9E9150485F8070A8F5 / MicroBlink.framework /; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
/ MicroBlink.framework in Embed Frameworks com.microblink.BlinkIdScanner / = {isa = PBXBuildFile; fileRef = 8F702B9E9150485F8070A8F5 / MicroBlink.framework /; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
3C37E193AC6B45ADA1E45795 / MicroBlink.framework in Frameworks / = {isa = PBXBuildFile; fileRef = 8F702B9E9150485F8070A8F5 / MicroBlink.framework */; };
I am getting Code signing "MicroBlink.framework" failed when i am trying to archive the project as Ad Hoc build on xcode 10, but it is working fine in old xcode versions and on device, even i tried the demo application on the documentation and i am getting the same error, and the below what i got from the build log
Failed to verify bitcode in MicroBlink.framework/MicroBlink:
error: Cannot extract bundle from /var/folders/jz/xmt34n614j36c71fthc0mrgw0000gp/T/IDEDistributionOptionThinning.bqx/Payload/E-Activation.app/Frameworks/MicroBlink.framework/MicroBlink (i386)
I got an error when adding blinkid-cordova
plugin on Mac. On my Windows PC targetting android, it seems to be fine and running perfectly.
mygrapari_dealer git:(feature/scan-document) โ ionic cordova plugin add blinkid-cordova
> cordova plugin add blinkid-cordova --save
Installing "com.microblink.BlinkIdScanner" for ios
Error during processing of action! Attempting to revert...
Failed to install 'com.microblink.BlinkIdScanner': CordovaError: Uh oh!
Cannot find resource file "/Users/adityapurwa/Documents/Workspace/Myriatek/Projects/mygrapari/mygrapari_dealer/plugins/com.microblink.BlinkIdScanner/src/ios/MicroBlink.bundle" for plugin com.microblink.BlinkIdScanner in iOS platform
at install (/Users/adityapurwa/Documents/Workspace/Myriatek/Projects/mygrapari/mygrapari_dealer/platforms/ios/cordova/lib/plugman/pluginHandlers.js:61:23)
at ActionStack.process (/Users/adityapurwa/Documents/Workspace/Myriatek/Projects/mygrapari/mygrapari_dealer/platforms/ios/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
at PluginManager.doOperation (/Users/adityapurwa/Documents/Workspace/Myriatek/Projects/mygrapari/mygrapari_dealer/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
at PluginManager.addPlugin (/Users/adityapurwa/Documents/Workspace/Myriatek/Projects/mygrapari/mygrapari_dealer/platforms/ios/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)
at Api.addPlugin (/Users/adityapurwa/Documents/Workspace/Myriatek/Projects/mygrapari/mygrapari_dealer/platforms/ios/cordova/Api.js:234:10)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
(node:742) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Uh oh!
Cannot find resource file "/Users/adityapurwa/Documents/Workspace/Myriatek/Projects/mygrapari/mygrapari_dealer/plugins/com.microblink.BlinkIdScanner/src/ios/MicroBlink.bundle" for plugin com.microblink.BlinkIdScanner in iOS platform
(node:742) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Using Ionic v3.20.0
Hello. We use BlinkID 1.5.0v. How do I change the text under the frame? I mean @"Position ID card in this Frame"
Uninstalling com.microblink.BlinkIdScanner from ios
(node:13673) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Expected "/* Begin ", "/* End ", """, or [A-Za-z0-9_.] but "/" found.
A typo in initIOSFramework.sh line 4, which should be
LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v4.4.0/blinkid-ios_v4.4.0.zip'
Since the Apple app store does not allow uploading of binaries for unsupported architectures will you add a capability or instructions on how to remove those binaries to this repo?
Here is a discussion of a similar issue for the Shopify API: https://stackoverflow.com/questions/30547283/submit-to-app-store-issues-unsupported-architecture-x86
Hello,
I want to implement a custom Template for a not yet supported card. I already found the templating example with the croatian ID card. My question now is: how do I get the new template into my phonegap plugin. I am not very firm in Java or Android so any hint will be apprechiated.
I already tried to import com.microblink.util into BlinkIdScanner.java, but the compiler only said "symbl not found". I am sure, I am making something fundametally wrong here and I need some help to get this to work.
Hi,
thnks for the API. I am trying to use the Cordova api in Oracle MAF Mobile Application, however, i got the beep.mp3 error. I read the readme and it seems i need to have the submodules. Any points how to get and add those modules manually.
I am currently working on a hybrid application and my cordova version is 3.7.0 where i am using IBM MobileFirst 7.1 version. There is no gradle file to compile as it comes as a part of Eclipse Plugin. I would like to know how i can integrate the phonegap plugin with my application without gradle.
The query that i have is do we need Android SDK 24 which is 7.0 to run this application. ?
The following code crashes on Android
var usdlCombinedRecognizer = new cordova.plugins.BlinkID.UsdlCombinedRecognizer();
var documentOverlaySettings = new cordova.plugins.BlinkID.DocumentVerificationOverlaySettings();
var recognizerCollection = new cordova.plugins.BlinkID.RecognizerCollection([usdlCombinedRecognizer]);
scanButton.addEventListener('click', function () {
cordova.plugins.BlinkID.scanWithCamera(
function callback(cancelled) {},
function errorHandler(err) {},
documentOverlaySettings, recognizerCollection, licenseKeys
);
});
logcat:
09-26 16:40:43.102 9797 9797 E AndroidRuntime: FATAL EXCEPTION: main
09-26 16:40:43.102 9797 9797 E AndroidRuntime: Process: com.acme.blink, PID: 9797
09-26 16:40:43.102 9797 9797 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.acme.blink/com.microblink.activity.DocumentVerificationActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2720)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2781)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.app.ActivityThread.-wrap12(ActivityThread.java)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1508)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.os.Looper.loop(Looper.java:241)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6274)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:354)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:323)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV9.initWindowDecorActionBar(AppCompatDelegateImplV9.java:175)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplBase.getSupportActionBar(AppCompatDelegateImplBase.java:145)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.support.v7.app.AppCompatActivity.getSupportActionBar(AppCompatActivity.java:109)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at com.microblink.activity.DocumentVerificationActivity.onCreate(line:43)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6720)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
09-26 16:40:43.102 9797 9797 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2673)
Any ideas?
Below is the code for US driving license but i am able to scan 2 out of 20 US driving cards from pdf in my PC. And same cards i scanned with Blinkid official app from playstore it scanned 11 out of 20 cards.
Please correct me if i m using wrong code.
scan() {
let usdlCombinedRecognizer = new window.cordova.plugins.BlinkID.UsdlCombinedRecognizer();
usdlCombinedRecognizer.returnFaceImage = true;
usdlCombinedRecognizer.returnFullDocumentImage = true;
let usdlSuccessFrameGrabber = new window.cordova.plugins.BlinkID.SuccessFrameGrabberRecognizer(usdlCombinedRecognizer);
// create RecognizerCollection from any number of recognizers that should perform recognition
let recognizerCollection = new window.cordova.plugins.BlinkID.RecognizerCollection([usdlSuccessFrameGrabber]);
recognizerCollection.allowMultipleResults = true;
// package name/bundleID com.microblink.blinkid
let licenseKeys = {
android: 'sRwAAAAXY29tLm9uZWJjZy5pZHNjYW5uZXJkZXZgrSTtAkdtBQOSkXe5VYYCa4Kv4FsowpNq6Q6kevm5y1Rg+mcpICc7mfJ6UGkbz0e5rbGHUfDrSw+/Da8RmbXqQNdZbeIaJTeA09rPdVbIgSNaCE0MPMtjs4GoIYvgLhUTCxUYOGYytrEDy+xXvWfSlgvnb4T4vJDjo8s7H9Vtto4YFDJg6Y1/r/sT6y8EKOe0505F4HUdM32JoO151b2hptIqRPC+qQCxpbaTqviIbbW4tUIXc72d',
ios: 'sRwAAAEXY29tLm9uZWJjZy5pZHNjYW5uZXJkZXaqsDWt96epsB3plipipFhh6ajAt2Jqa6SK6VoXFjtXKOwVtFDeohKhHrxl/NgbZzKlmKQHACT2i54VrtMDYr13qjdQn7WBD+QlfrVapmE6EhmfetkuCXgK8wTryy9ke7lYLw8243QABuWrQzn0JTZJYihkf7TrqMaG8ave/qeGtrPtqHeNpP4eSi7LlScty6vaf8pby4ZOsKSfrTzFfoBDA88I5E/F310Y4FFsUXw2ZAlQCOKemXTy'
};
window.cordova.plugins.BlinkID.scanWithCamera((cancelled) => {
if (cancelled) {
this.alertProvider.showToast('cancelled')
return;
}
if (usdlCombinedRecognizer.result.resultState == window.cordova.plugins.BlinkID.RecognizerResultState.valid) {
// success frame is available in usdlRecognizer's successFrameGrabber wrapper's result as Base64 encoded JPEG
let successFrame = usdlSuccessFrameGrabber.slaveRecognizer.result.fullDocumentImage;
if (successFrame) {
this.successFrame = "data:image/jpg;base64," + successFrame;
}
// Face image is returned as Base64 encoded JPEG
let resultFaceImage = usdlSuccessFrameGrabber.slaveRecognizer.result.faceImage;
if (resultFaceImage) {
this.faceImage = "data:image/jpg;base64," + resultFaceImage;
}
let fields = usdlCombinedRecognizer.result.fields;
let USDLKeys = window.cordova.plugins.BlinkID.UsdlKeys;
let fieldDelim = "<br>";
let resultDiv = /** Personal information */
"USDL version: " + fields[USDLKeys.StandardVersionNumber] + fieldDelim +
"Family name: " + fields[USDLKeys.CustomerFamilyName] + fieldDelim +
"First name: " + fields[USDLKeys.CustomerFirstName] + fieldDelim +
"Date of birth: " + fields[USDLKeys.DateOfBirth] + fieldDelim +
"Sex: " + fields[USDLKeys.Sex] + fieldDelim +
"Eye color: " + fields[USDLKeys.EyeColor] + fieldDelim +
"Height: " + fields[USDLKeys.Height] + fieldDelim +
"Street: " + fields[USDLKeys.AddressStreet] + fieldDelim +
"City: " + fields[USDLKeys.AddressCity] + fieldDelim +
"Jurisdiction: " + fields[USDLKeys.AddressJurisdictionCode] + fieldDelim +
"Postal code: " + fields[USDLKeys.AddressPostalCode] + fieldDelim +
/** License information */
"Issue date: " + fields[USDLKeys.DocumentIssueDate] + fieldDelim +
"Expiration date: " + fields[USDLKeys.DocumentExpirationDate] + fieldDelim +
"Issuer ID: " + fields[USDLKeys.IssuerIdentificationNumber] + fieldDelim +
"Jurisdiction version: " + fields[USDLKeys.JurisdictionVersionNumber] + fieldDelim +
"Vehicle class: " + fields[USDLKeys.JurisdictionVehicleClass] + fieldDelim +
"Restrictions: " + fields[USDLKeys.JurisdictionRestrictionCodes] + fieldDelim +
"Endorsments: " + fields[USDLKeys.JurisdictionEndorsementCodes] + fieldDelim +
"Customer ID: " + fields[USDLKeys.CustomerIdNumber] + fieldDelim;
this.data = resultDiv;
} else {
this.data = "Result is empty!";
}
// alert(JSON.stringify(this.data))
},
// Register the error callback
function errorHandler(err) {
alert('Error: ' + err);
},
documentOverlaySettings, recognizerCollection, licenseKeys
);
}
Hi I need to change overlay for blinkid how can i achieve it. Is there any code or which file to edit. As i am working on ongoing project so please allow me some fast response thanks.
Hello,
I't would really be helpful if there is an example on how to add BlinkID to an existing ionic project.
Thank you.
Ionic Pro, the latest offering from the Ionic team, does not support Git LFS on their internal Gitlab server. This poses a problem for using the BlinkID Phonegap plugin since the plugin is 115 MB in size. After contacting the Ionic support I was told they have no plans to add LFS support to their Pro offering.
Can we get the BlinkID Phonegap plugin posted to NPM so we can download it as a part of the build process? If you need help in this area I can definitely pitch in.
So, when two recognizers are used at once like
var recognizerCollection = new cordova.plugins.BlinkID.RecognizerCollection([usdlCombinedRecognizer, mrtdSuccessFrameGrabber]);
plugin works fine with US DL: reads both sides, etc.
But when presented a passport, it reads the first side and then demands for a back side, which, obviously, non existent in passports.
I guess desired behavior is to get plugin stop scanning once it sees a recognizable passport.
This plugin does not work with latest ionic/cordova native camera plugin.
:app:transformDexArchiveWithExternalLibsDexMergerForDebug
FAILED
FAILURE: Build failed with an exception.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex.
premchandkumar$ ionic cordova plugin list
cordova plugin ls
com.microblink.BlinkIdScanner 1.4.3 "BlinkIdScanner"
cordova-open-native-settings 1.4.1 "Native settings"
cordova-plugin-camera 4.0.2 "Camera"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
My system's ionic info:
premchandkumar$ ionic info
cli packages: (/Users/premchandkumar/.nvm/versions/node/v8.9.4/lib/node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
ios-sim : 6.0.0
Node : v8.9.4
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : /Users/premchandkumar/Library/Android/sdk
Misc:
backend : pro
on doing ionic cordova build android i get this issue
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_cdbk63550k3sysl4sp6slfpfp.run(D:\WorkingFolderMvc\ID Scanning\platforms\android\app\build.gradle:145)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:javaPreCompileDebug UP-TO-DATE
D:\WorkingFolderMvc\ID Scanning\platforms\android\app\src\main\java\com\phonegap\plugins\microblink\overlays\serialization\BarcodeOverlaySettingsSerialization.java:3: error: package com.microblink.blinkid does not exist
import com.microblink.blinkid.R;
^
D:\WorkingFolderMvc\ID Scanning\platforms\android\app\src\main\java\com\phonegap\plugins\microblink\overlays\serialization\DocumentOverlaySettingsSerialization.java:3: error: package com.microblink.blinkid does not exist
import com.microblink.blinkid.R;
^
D:\WorkingFolderMvc\ID Scanning\platforms\android\app\src\main\java\com\phonegap\plugins\microblink\overlays\serialization\BarcodeOverlaySettingsSerialization.java:16: error: package R does not exist
uiSettings.setSplashScreenLayoutResourceID(R.layout.mb_layout_splash_screen);
^
D:\WorkingFolderMvc\ID Scanning\platforms\android\app\src\main\java\com\phonegap\plugins\microblink\overlays\serialization\DocumentOverlaySettingsSerialization.java:16: error: package R does not exist
uiSettings.setSplashScreenLayoutResourceID(R.layout.mb_layout_splash_screen);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
4 errors
:app:compileDebugJavaWithJavac FAILED
27 actionable tasks: 1 executed, 26 up-to-date
FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 37s
(node:12572) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
D:\WorkingFolderMvc\ID Scanning\platforms\android\app\src\main\java\com\phonegap\plugins\microblink\overlays\serialization\BarcodeOverlaySettingsSerialization.java:3: error: package com.microblink.blinkid does not exist
import com.microblink.blinkid.R;
^
D:\WorkingFolderMvc\ID Scanning\platforms\android\app\src\main\java\com\phonegap\plugins\microblink\overlays\serialization\DocumentOverlaySettingsSerialization.java:3: error: package com.microblink.blinkid does not exist
import com.microblink.blinkid.R;
^
D:\WorkingFolderMvc\ID Scanning\platforms\android\app\src\main\java\com\phonegap\plugins\microblink\overlays\serialization\BarcodeOverlaySettingsSerialization.java:16: error: package R does not exist
uiSettings.setSplashScreenLayoutResourceID(R.layout.mb_layout_splash_screen);
^
D:\WorkingFolderMvc\ID Scanning\platforms\android\app\src\main\java\com\phonegap\plugins\microblink\overlays\serialization\DocumentOverlaySettingsSerialization.java:16: error: package R does not exist
uiSettings.setSplashScreenLayoutResourceID(R.layout.mb_layout_splash_screen);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
4 errors
FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 37s
at ChildProcess.whenDone (D:\WorkingFolderMvc\ID Scanning\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
Plugin version 4.5.0
Cordova 7.1.0
Android 7.1.4
cordova clean android does not fix it
Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Only fixed by removing this plugin.
Here are the other installed plugins
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.1" />
<plugin name="cordova-plugin-geolocation" spec="^4.0.1" />
<plugin name="cordova-plugin-dialogs" spec="^2.0.1" />
<plugin name="cordova-plugin-device" spec="^2.0.1" />
<plugin name="cordova-plugin-appversion" spec="^1.0.0" />
<plugin name="cordova-plugin-camera" spec="^4.0.2" />
<plugin name="cordova-plugin-inappbrowser" spec="^2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="cordova-plugin-wkwebview-engine" spec="^1.1.4" />
There are different types of IMM13 documents('Single entry visa','visa pass') which starts from different series(please find attached images 'one' and 'two' ).
For Image 'one' I am getting the response from scan with document type 4. But for image 'two' I am not getting response and eventually it fails.
I am using MRTDRecognizer like below,
recognizer = new (<any>window).cordova.plugins.BlinkID.MrtdRecognizer();
documentOverlaySettings = new <any>window).cordova.plugins.BlinkID.DocumentVerificationOverlaySettings();
Moreover, I want to know for which card the service will return 6 as all the cards are of IMM13.
BlinkID version:
4.4.1
Device model:
OnePlus 5T
Device Android version:
Pie
Device ABI (processor architecture, e.g. ARMv7):
Qualcomm Snapdragon 835 MSM8998
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.