Phonegap plugin for barcode scanner is not working..

2,039 views
Skip to first unread message

senthil kumar

unread,
Jul 26, 2012, 9:39:30 AM7/26/12
to phon...@googlegroups.com
Hi,
  I have followed the instruction that is given in the following links



The library is working fine in both emulator and the device(samsung galaxy ace plus mobile phone)

when i include that library into my phonegap application as per the instruction it is not working..

showing some of the following error...

07-26 19:07:30.077: E/dalvikvm(281): Could not find class 'android.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.generateWebResourceResponse

and then when i click the scan button then it shows the following error message..

07-26 19:08:20.197: E/AndroidRuntime(281): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.creatphngap/com.google.zxing.client.android.CaptureActivity}: android.view.InflateException: Binary XML file line #20: Error inflating class cordova

i have spent whole on this error please help me to resolve it....






senthil kumar

unread,
Jul 27, 2012, 8:56:36 AM7/27/12
to phon...@googlegroups.com
Application is now working fine....
     I have cleaned all the projects i.e library and application and start to build the application from the base now it is working fine and also 
change all the switch case statement in the library into if else statement..

senthil kumar

unread,
Jul 27, 2012, 9:00:37 AM7/27/12
to phon...@googlegroups.com
Now the barcode scanner works in the phone gap but the result is not return to the alert box in the phone gap it return always empty but bar code is scanned i use the following code..

 function scan() {
        window.plugins.barcodeScanner.scan(function(result) {
                alert("We got a barcode\n" +
                      "Result: " + result.text + "\n" +
                      "Format: " + result.format); 
            }, function(error) {
                alert("Scanning failed: " + error);
            });
    }

i have got the as "We got a  barcode Result:  Format:"  it always return the empty value..

On Thursday, July 26, 2012 7:09:30 PM UTC+5:30, senthil kumar wrote:

Libby

unread,
Jul 27, 2012, 11:51:15 AM7/27/12
to phon...@googlegroups.com
Anything in logcat?  What os version is it?

senthil kumar

unread,
Jul 28, 2012, 12:05:50 AM7/28/12
to phon...@googlegroups.com

In the OS Version android 2.3 in samsung galaxy s7500.

senthil kumar

unread,
Jul 28, 2012, 2:57:32 AM7/28/12
to phon...@googlegroups.com
I got the following screen in my mobile samsung ace plus s7500 i have attached the screen shot then when i pressed the back button in the mobile it again move to barcode scanner from there when i press the back button it shows the alert message with the empty result how can i get the result in the alert box please help...
SC20120728-122202.png
Message has been deleted
Message has been deleted

senthil kumar

unread,
Jul 28, 2012, 8:18:58 AM7/28/12
to phon...@googlegroups.com
The library which i downloaded from the following link
is not working...

so i created myself with the help of the Zxing2.0 .... please upload the correct library file for the barcode scanner... then only i got alert message when
the barcode is scanned.

arindam mukherjee

unread,
Jul 28, 2012, 8:34:21 AM7/28/12
to phon...@googlegroups.com
Now is it working???

senthil kumar

unread,
Jul 30, 2012, 12:26:02 AM7/30/12
to phon...@googlegroups.com
The barcode is scanned but the result is not send back to the phonegap . I have attached both the screenshot.
I got the result in the library but the result is not send back to phonegap.
SC1.png
SC2.png

senthil kumar

unread,
Jul 31, 2012, 8:12:28 AM7/31/12
to phon...@googlegroups.com
I solved it by build the library from the scratch and add it to the my application now it is working properly...
Thanks for your support too...

naresh

unread,
Sep 27, 2012, 2:44:48 AM9/27/12
to phon...@googlegroups.com
Hi senthi Kumar ,
i am also facing same issue , while reading the bar-code abnormally it stopped  ,see the link


alan blount

unread,
May 28, 2013, 12:00:10 PM5/28/13
to phon...@googlegroups.com
in case this helps anyone else:
https://github.com/zeroasterisk/PhoneGap-BarcodeScanner-Example-iOS

On Wednesday, April 17, 2013 12:31:25 PM UTC-4, alan blount wrote:


On Tuesday, July 31, 2012 8:12:28 AM UTC-4, senthil kumar wrote:
I solved it by build the library from the scratch and add it to the my application now it is working properly...
Thanks for your support too..

@senthil kumar

can you send me an example?  do you have instructions?

dheeraj....@durlabhcomputers.com

unread,
Sep 9, 2014, 10:08:25 AM9/9/14
to phon...@googlegroups.com
Any Idea to get Barcode in text box After Scan right now Success function fire after Device Back button 



???
Reply all
Reply to author
Forward
0 new messages