Scan barcode instead of keyboard in web view

Is it possible to use a barcode scanner (e.g. zxing) instead of a keyboard in web browsing? Therefore, to be clear, when I click on a text box inside my web view, I would like to cancel the keyboard call and open the barcode scanner instead of entering into the text box. Is it possible?

+4
source share
6 answers

Yes, maybe I implemented this soft keyboard that does the job. Key "Long press" and you can scan the code that is added to the text box that has focus.

http://www.androidbroadcast.com/en/softkeyboard/index.html

+1
source

The Barcodescanner keyboard allows you to do just that. It is definitely possible.

+1
source

maybe go to http://www.tec-it.com/en/software/android/barcode-keyboard/barcodekeyboard-overview/Default.aspx download a demo version of the barcode keyboard and enjoy ....

+1
source

Not in any standard module: you can connect your own JavaScript handler that listened for focus messages from a specific text input (perhaps identified by its identifier?), And then use InputMethodManager to hide the input method and launch your barcode reader. When the barcode reader returns with content, you can use the same JavaScript handler to insert the result into the input text box.

0
source

This is not quite what you ask for, but you can work: you can change the ZXing barcode scan library to send key events for each character in the scanned barcode. I assume that these key events will be interpreted by the text box. You can program a barcode scanner to add a carriage return or anything to receive data in a text field, as if someone had pressed an enter key. You can put a frame around your layout and rotate it in red or something else to indicate to the user that he will accept the entered data or scan the barcode.

0
source

This is not possible - at least in Android or ZXing there is nothing that allows you to do this directly. But you can certainly write your own input method that does such a thing if you are willing to invest the work. ZXing is open source , and there were some discussion topics in the section.

-1
source

All Articles