Comments (14)
Hello @AlibekJ ,
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
Please edit AndroidManifest.xml and set theme to Theme.AppCompat
Which version of the Cordova are you using?
Regards
from blinkid-cordova.
Sorry, please use: Theme.AppCompat.NoActionBar
With this theme you will get the following:
Regards
from blinkid-cordova.
I am on cordova 8.1..0
Please edit AndroidManifest.xml and set theme to Theme.AppCompat
Sorry, culoi, would you, please, be more specific. I found 14 AndroidManifest.xml files, modified the one in /platforms/android/CordovaLib like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.apache.cordova" android:versionName="1.0" android:versionCode="1" android:theme="@android:style/Theme.AppCompat.NoActionBar">
<uses-sdk android:minSdkVersion="16" />
</manifest>
and it had no effect. I am not sure what I am doing.
from blinkid-cordova.
I had exactly the same problem. Took me about a week to find out: It's the "DocumentVerificationOverlaySettings". Use "DocumentOverlaySettings" instead.
I've no idea, what the difference is, but it doesn't crash anymore. The demo code also uses "DocumentOverlaySettings": https://github.com/BlinkID/blinkid-phonegap/blob/master/www/js/index.js#L78
from blinkid-cordova.
If you are using CombinedRecognizer, documentVerificationOverlay is must, as it notifiy the user to scan the front and the back side.
Please check it our more here: https://github.com/BlinkID/blinkid-android#-documentverificationactivity-and-documentverificationoverlaycontroller
You can also check out our video of implementing verificationOverlay and UsdlCombined recognizer: https://github.com/BlinkID/blinkid-phonegap#using-documentverificationoverlay-and-combinedrecognizer
Regards
from blinkid-cordova.
Hello @AlibekJ
Location of the AndroidManifex.xml is as following:
/platforms/android/app/src/main/
Please test it out and let us know how it works.
Regards
from blinkid-cordova.
Tried your suggestion, modified /platforms/android/app/src/main/AndroidManifest.xml
However, when trying to build, script adds another line into AndroidManifest.xml like this:
<activity android:configChanges="orientation|screenSize" android:name="com.microblink.activity.ScanCard" android:screenOrientation="portrait" android:theme="@android:style/Theme.AppCompat.NoActionBar" />
<activity android:configChanges="orientation|screenSize" android:name="com.microblink.activity.ScanCard" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
so naturally it fails with:
Element activity#com.microblink.activity.ScanCard at AndroidManifest.xml:13:9-212 duplicated with element declared at AndroidManifest.xml:12:9-212
from blinkid-cordova.
Hi @AlibekJ,
you have to modify the AndroidManifest.xml inside the demo application that is created with initCordovaDemoApp.sh script (after this scrip is executed), or AndroidManifest.xml inside your application if you don't use initCordovaDemoApp.sh.
In the next release of the BlinkID cordova plugin, this will be fixed and you won't need to do any modifications to make things work.
Best Regards
from blinkid-cordova.
I am having this same issue on iOS. When using the same code as @AlibekJ above, I receive the following error:
-[NSNull length]: unrecognized selector sent to instance 0x1b4c7f878
Reverting to var documentOverlaySettings = new cordova.plugins.BlinkID.DocumentOverlaySettings();
fixes the error but does not allow me to scan both the front and back of the ID. Thoughts?
from blinkid-cordova.
Suggestion one above given by @i1E worked for me.
from blinkid-cordova.
Suggestion one above given by @i1E worked for me.
Thanks for the response! I am only interested in getting this working on iOS at the moment. It seems the solution above is addressing android builds. Is there something similar I need to do to get this going on iOS?
from blinkid-cordova.
Try this. I just ran it on iOS and it worked.
let usdlCombinedRecognizer = new cordova.plugins.BlinkID.UsdlCombinedRecognizer();
usdlCombinedRecognizer.returnFaceImage = true;
usdlCombinedRecognizer.returnFullDocumentImage = true;
let documentOverlaySettings = new cordova.plugins.BlinkID.DocumentVerificationOverlaySettings();
let usdlSuccessFrameGrabber = new cordova.plugins.BlinkID.SuccessFrameGrabberRecognizer(usdlCombinedRecognizer);
let recognizerCollection = new cordova.plugins.BlinkID.RecognizerCollection([usdlSuccessFrameGrabber]);
myfunction = function () {
cordova.plugins.BlinkID.scanWithCamera(
function callback(cancelled) {
if (usdlCombinedRecognizer.result.resultState == cordova.plugins.BlinkID.RecognizerResultState.valid) {
}
},
function errorHandler(err) {},
documentOverlaySettings, recognizerCollection, licenseKeys
);
};
from blinkid-cordova.
Hi @cameronwiebe,
can you try setting the property values on DocumentVerificationOverlaySettings to following values and not to null?
glareMessage = "Slightly move ID to eliminate glare.";
firstSideInstructions = "Place the front side of the document in the frame and wait for automatic scan.";
secondSideInstructions = "Place the back side of the document in the frame and wait for automatic scan.";
firstSideSplashMessage = "Document front side";
secondSideSplashMessage = "Document back side";
scanningDoneSplashMessage = "Document scanning done";
from blinkid-cordova.
@jcular This solved it! Thanks so much for the help.
from blinkid-cordova.
Related Issues (20)
- not able to install plugin for ios HOT 4
- Not able to catch timeout HOT 2
- Not able to get face image while face image is true and full document is false HOT 1
- App getting crashed with One plus one device HOT 1
- Get the back image of the scanned USDL HOT 2
- Support for vertical USDL HOT 2
- Cant run plugin HOT 1
- cordova plugin : verification failed related to Unsupported Architectures, while submission to apple HOT 3
- Conflict with cordova-plugin-camera on Android HOT 1
- secondSideSplashMessage does not show up on iOS HOT 3
- Upgrade the plugin from 1.5.0 to latest (5.5.0) getting invalid license HOT 1
- Back side of US DL HOT 7
- Build 5.7.1 fails to install HOT 9
- Failed to detect if front and back side match in iOS HOT 4
- Build "MicroBlink.framework" failed. on xCode Version 12.x (macOS Big Sur) HOT 4
- Orientation does not match device when initialized horizontally HOT 4
- unable to get face image HOT 4
- Is there a way to turn off intro tutorial HOT 1
- In iOS, after scanning front and back, all images are undefined in BlinkIdMultiSideRecognizer.result HOT 1
- Fail to install in IOS platform HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blinkid-cordova.