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.
source share