Prasanna
Prasanna

Reputation: 235

Barcode scanner for PhoneGap/cordova

I am building one android application using cordova/phonegap and Javascript. I am using scandit barcode scanner for scanning functionality. Scandit barcode scanner occupies entire screen while scaaning. But I need scanning only in perticular area/div in my application. How can I solve that issue? Is there any other scanner which can solve this issue?

Upvotes: 3

Views: 725

Answers (1)

Alok Nair
Alok Nair

Reputation: 4004

If you are just calling BarcodeScanner via an intent you have no control. However if you are embedding the Java code from the BarcodeScanner app in your app you have all the java code and xml resources available and can edit them how you like. It will all be Java and native Android resource stuff though.. not html.

If you are embedding the layout is

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

and the activity that does the scanning you want to edit is

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

If you add a button in the layout and call finish in the OnClickListener you set up in the activity it would be a back as you desire..

Upvotes: 1

Related Questions