Barcode scanner for PhoneGap / cordova

I am creating one android app using cordova / phonegap and Javascript. I am using scandit barcode scanner to scan. The Scandit barcode scanner occupies the entire screen during cleaning. But I only need to scan in the perticular area / div in my application. How can I solve this problem? Is there another scanner that can solve this problem?

+3


source to share


1 answer


If you just call BarcodeScanner with intent, you have no control. However, if you embed Java code from the BarcodeScanner app in your application, you have all the java code and xml resources available and can edit them however you like. This will all be Java and native Android stuff, though .. not html.

If you embed a layout,

http://code.google.com/p/zxing/source/browse/trunk/android/res/layout/capture.xml



and the activity you want to change is

http://code.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/CaptureActivity.java

If you add a button to the layout and complete the call to the OnClickListener that you configured in the action, it will revert back as you wish.

+1


source







All Articles