[TC51] In-browser scan withtout having focus on text field

Hi,

I've been through a few topics speaking about in-browser scan and how you need to have focus on a text field to get input, but I could not find any solution about how to get scan events when no input is focused.

Since the app I am currently working on is scan-heavy and should be based on a web browser, it is really important that the user does not have to press a button beforehand in order to trigger focus on a text input. However, I couldn't find any event that is triggered when the focus is not on a text input.

Is there any configuration on DataWadge, event I didn't detect, or any other way to get scan to be detected without having to set the focus on a text input?

I am working with a TC510K on Android 7.1.2 (Nougat) and DataWedge version is 6.6.50.

Hello,

We had the same issue with capturing barcode data in a web browser without having an input.

We are capturing the keypress event in Javascript like this:

  <script type="text/javascript">

      document.addEventListener("keypress", function onPress(event) {

          

          var displayStr=String.fromCharCode(event.keyCode);

          // Do something with data

          document.getElementById("display").innerHTML = document.getElementById("display").innerHTML+displayStr;

     });

</script>

With a Datawedge profile set to enable keystroke output.

With a TC51 running Android M and Datawedge 6.3.41 this was working without any problems. However when we got a TC56 running Android N and Datawedge 6.6.50 the method above didn't work, no data was captured.

What we had to do is update to the latest Datawedge 6.8.50 which gives you an additional option in the Datawedge keystroke output. This is "Inter character delay" which once set to a value meant that the javascript keypress capture above works again. We set it to 5ms.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Derek,

I have the same set up and issue as you,

  <script type="text/javascript">

      document.addEventListener("keypress", (e) => {

          which(e.keyCode) {

               case 13: {

                     // enter pressed: search

                        searchString();   

                }

               default: {

                    this.addLetter(String.fromCharCode(e.which))

               }

     });

</script>

Can you provide more info on how you resolve this? My TC Scanner does not pick up the keypress.

Did you only have to "enable keystroke output" and set "Inter character delay" to 5ms?

Here are my scanner detail:

Datawedge Version: 6.6.50

Android Version: 7.1.2

Model: TC510K

Seems like my Datawedge version is not up to date. How do I update it to Datawedge 6.8.50

Thanks

Vu

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Can you please update to latest LG patch and try?

Regards,

Joydeep

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Our client is looking to deploy Microsoft Dynamic 365 for their POS system.  The default screen does not have a text input field. On a PC this is not a problem as the barcode scanner activity is automatically recognised, the barcode data captured and everything progresses.  However on the TC51 this does not work.  The barcode scanner is not recognised and no data is captured by the browser app.  The user has to proactively press a key to enable a search field for text input first.  It would be nice if Zebra and Microsoft could work together on this one and provide a documented solution.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


If you use Zebra Enterprise Browser product, you should be able to do that in two ways.

1.Get the Scanned Data via Datawedge Intent

Intent Output - Zebra Technologies TechDocs

Capture the scanned data via Intents in Enterprise Browser.

2.Implement Barcode Scanning JavaScript APIs in your web app.

Barcode - Zebra Technologies TechDocs

If you do not want to change your server side application you can achieve adding scanner from client as well via Dom Injection feature

DOM Injection - Zebra Technologies TechDocs

Regards,

Joydeep

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


com

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’