Search code examples
androidbarcode-scannermotorola-emdk

EMDK scanner puts scanned value into input text


I have application using EMDK, my test device is TC55. I successfully created code for enabling and receiving scanning data. But I have different problem - when I scan barcode and have EditText field visible in my fragment scanned value ALWAYS is added there. Even when input field has no focus.

I don't want that behavior - I want result of scanning to be passed only to backend methods of application, and not to input textfield.

Please, help


Solution

  • By default Zebra Technologies android devices, like TC55, are configured to use DataWedge to insert barcode data as keyboard entry event.
    In this way, with no particular coding, your application can receive barcode data.

    DataWedge includes a profile system, where you can associate your application package name and Activities to specific profiles and have the data sent to your application via Intents. You can find more about this on Zebra developer portal and in particular on how to configure DataWedge.

    On top of that Zebra Technologies periodically releases EMDKs for Java and Xamarin to enable automating these configurations from Android applications and provides a full Barcode Scanning API that allows your application to take full control of the hardware barcode scanner.

    Disclaimer: I work for Zebra Technologies.