Using zxing in a browser based web app?

958 views
Skip to first unread message

PaulJ

unread,
May 1, 2010, 3:38:34 PM5/1/10
to zxing
I was wondering if this is at all possible. What I want to do is a
have a a web page that simply has a text box on it.

1. When the text box gains focus, call the onfocus event in
javascript, which immediately clears the clipboard and then calls
http://zxing.appspot.com/scan.
2. User clicks to use BarCode Scanner.
3. User scans the barcode, which immedately copies the barcode to the
clipboard and returns focus back to the web application.
4. The webpage is using a setimeout for 1000 ms to check to see if the
clipboard is empty, and stays in a continuous loop until it gets a non-
empty value.
5. Once the scan is made and focus returned back to the web page, the
barcode contents populates the text box with the contents of the
barcode.

Is that possible? Is there a better way (other than writing an non-
browser based app)?

Thanks,

Paul

Sean Owen

unread,
May 1, 2010, 6:49:24 PM5/1/10
to zxing
This is possible as of the next version, which I think performs the
function you want, even if the implementation is slightly different.
It's more robust.

http://code.google.com/p/zxing/issues/detail?id=370

Paul Jackson

unread,
May 1, 2010, 6:58:28 PM5/1/10
to zx...@googlegroups.com
Slightly different, but something I can work with.  Very excited.  That really changes how I'm going to design my app knowing this.  Sweeeet.  More from me later......
 
Paul

Michael Sullivan

unread,
May 5, 2010, 11:04:58 PM5/5/10
to zx...@googlegroups.com
I've been using this feature for the past few weeks as part of a web app i am building.  
I've used this on Android 2.1 (motorola droid).
It has worked perfectly and is very useful until I decide to build a full native app with zxing integrated.

sull
Reply all
Reply to author
Forward
0 new messages