0

I have a servlet based web application which provides web pages for Motorola RF Barcode Scanners which are running on a customer site and they are still using Symbol Pocket Browser rather then the more up to date Enterprise Browser. I don't have any control over that.

The application has worked fine for many years as it has only had to scan a single string which is a 20 digit numeric string using EAN128 barcode rules.

I use meta commands in the html so that when the user scans data the decoded values are entered in the active input box on screen and then an auto-enter is performed. All that works fine.

I now need to scan a more complex EAN-128 barcode which has multiple application identifiers in it and most importantly one of the fields is variable length and is terminated by a FNC1 character. When SPB scans this barcode the data is returned without any field delimiter and as such its not possible to decode the data properly.

All I can find online now is documentation for RhoElements and the latest Enterprise Browser and I don't see a way to read the data without losing the important delimited.

I think it may be possible to have it run some javascript when data is decoded and maybe save the data in a session variable which my servlet can access - but I'm working blind.

Has anyone come across this scenario and can provide either sample html/javascript which works or maybe a link to SPB documentation (programming guide)?

Daniel Beck
  • 20,653
  • 5
  • 38
  • 53

1 Answers1

0

You can still download PocketBrowser v3.x from Zebra Technologies support website (Zebra Technologies acquired Motorola Solution Enterprise Business in Oct. 2014).

The download package includes a PocketBrowser guide.

We highly recommend existing users to upgrade to Enterprise Browser that is supporting newer OS and devices, maintaining as much as possible compatibility with existing Symbol, Motorola, Zebra devices.

For "Symbol Pocket Browser v2.x" you can use the "scannernavigate" META tag which navigates to a URL or calls a JavaScript function when the scanner or imager successfully decodes a barcode or symbol.

The following example sets up the scanner on a page to call a JavaScript function upon successful decoding:

<META HTTP-Equiv="scanner" Content="enabled">
<META HTTP-Equiv="scannernavigate" Content="javascript:doScan('%s', '%s', %s, '%s', %s);">

<script>
   function doScan(data, source, type, time, length)
   {
      if(type == 0x35) //ean 13
      {
         alert('Please scan a non EAN 13 code!');
      }
      else
      {
         var amount = prompt('Enter an amount for code: ' + data', '');
      }
   }
</script>

Disclaimer: I work for Zebra Technologies

Updated answer to cover Symbol Pocket Browser v2.x syntax

pfmaggi
  • 6,116
  • 22
  • 43
  • I am having to use version 2.2 of SPB at the moment. I found a reference to `` but I don't see that in the 3.x documentation - is it still available and can I use your syntax with version 2.2 ? – user1490664 Oct 28 '17 at 19:24
  • Your example code worked ok for me. Previously I was just accessing the value of the data from the input field which had been pseudo typed and found that it did not contain the FNC1 character. Using the meta tag above and assigning the value to a hidden field on the form works fine. – user1490664 Nov 01 '17 at 18:19