I want to read barcodes and QR codes using the barcode scanner integrated into the Zebra TC73 mobile device and receive the content in the Perspective mobile application.
I designed an application with a view and a "Barcode Scanner Input" component. I configured the prefix and the suffix in the Perspective component and in the DataWedge application on the mobile device. I can't get the scanned barcode to be received. However, when I focus on a text field, it works. The drawback of this approach is that the focus must be on the component.
When I run the project in a browser like Chrome on a computer and use a Zebra DS3608 barcode scanner connected via USB, it works.
Can you help me with this?
I think some people have experimented with using software triggers/intent, but I don't know the current status of doing it that way and haven't tried myself.
I use this same setup with the scanner configured to output the scan in keyboard wedge mode, IE keystrokes.
As noted in the docs, the Barcode Scanner Input component is designed for keyboard wedge devices--it doesn't work with or naturally invoke a mobile device's native barcode capabilities.
Native barcode scans, only available in a mobile app, are triggered by the Scan Barcode Action (on a button, usually), and the results are delivered to a session event script.
The two methods are not interchangeable.
Is there a way to do it properly?
Change the device settings to output the scans as keystrokes. This is the proper way with your setup.
I found a suitable configuration to get the Zebra device working. In the DataWedge application, under "Keystroke Output" in "Keyboard Event Options", I had to enable the "Send characters as events" option.
This works with the "$" prefix and the "%" suffix, but not with the "STX" (ASCII 2) and "ETX" (ASCII 3) characters, even with or without the "Send control characters as events" option enabled.
Unfortunately, these characters are frequently used in our vision applications via the Sepasoft module.
I often use the regex option instead of the prefix/suffix framing when I have a small amount of barcode patterns allowed. This gives me some validation on the front end, but less flexible if many formats are needed.
You can still try the regex, maybe something like \x02(.*?)\x03