Enterprise Browser and TC8000 barcode scanning

We have a TC8000, full part number TC80NH-2101K420NA, which has both SE4750MR scan engine PLUS 8 MP camera.  Our challenge is that when attempting to scan a barcode within Enterprise Browser the trigger action appears to activate the camera instead of the SE4750MR scan engine.  Is there some way to force the trigger action to use the scanner instead of the camera?

Sunil Kumar
Hi Andrew, please share the

Hi Andrew, please share the html page you have used to enable scanning in Enterprise Browser. Its should be a matter of enumerating the available scanners on the device and selecting the one you need for scanning.

Thanks

Sunil

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Andrew Pengelly
Hi Sunil sorry but I don't

Hi Sunil sorry but I don't have access to the HTML.  The background to this is that the web pages being accessed work 100% on MC3190's running PocketBrowser.  The client does not want to modify the web pages.  They are expecting all Zebra devices running Enterprise Browser to be compatible.  So I guess the question is - can we disable the camera as a barcode scanner thereby forcing the imager to take precedence?  The TC8000 Integrators Guide simply says pull the trigger to activate the barcode scanner.  Unfortunately it is the same instruction for both the imager and the camera with no detail on how to set any precedence for which scanner to use.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Hi Andrew,Using the Scanner

Hi Andrew,

Using the Scanner API on Android devices, with EB v1.4 and older you get as the default scanner the camera.

I don't think that there's a way to change this behaviour with the current EB version without modifying the original pages.

The key point is that with the Scanner API, at this moment you need to specify the HW Barcode scanner as the one that you want to enable. I don't have a TC8000, but I see a similar behaviour on the TC70 where, to use the imager with the Scanner API, I've to specify that I want to enable "SCN2":

<META HTTP-Equiv="Scanner" content="Enabled:SCN2">

Best regards

~Pietro

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Edward Correia
If the problem can be solved

If the problem can be solved with a meta tag, then the tag can be inserted into the HTML at runtime using DOM injection.

DOM Injection was added to EB beginning with v.1.3. 

Regards,

Eddie

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Pietro Francesc...
I've repeated the test I've

I've repeated the test I've done using both default meta tags in the config.xml using a Dom Injection with the same result:

If the original pages contains the tags to enable the scanner, these override every other configuration.

I think that this can be fixed only modifying the original files, selecting the right scanner object or removing the selection of the scanner object completely and use a default meta tag or a Dom Injection file.

I've attached a sample app showing the issue.

Best regards

~Pietro

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Andrew Pengelly
Hi PietroThanks that is very

Hi Pietro

Thanks that is very helpful. I had a quick test at my end and found that I could get it to work as you suggested by removing this line code from the web page HTML -

REMOVE     <metahttp-equiv="Scanner" content="Enabled">

I then added the following to the Enterprise Browser config.xml file on the TC8000

ADD               <MetaTag value="Scanner~Enabled:SCN2;"/>    

Further testing required to make sure it works all over but your help is greatly appreciated.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Andrew Pengelly
The official response via the

The official response via the Zebra Support Desk is that the scanner API in Android sets the camera as the default barcode scanner.  The suggested solutions were -

1. Get a TC8000 without a camera.

2. Rewrite all the HTML code to remove the problem code and define the scanner using DOM injection as part of the device CONFIG.XML.

Since in our case the development environment automatically adds the HTML scanner code at time of compile option #2 is not useful.  So next step is to try a camera free device.

What would be preferable is some why to change the Android default however no one has been able to find a away to achieve that.  May be next version.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Pietro Francesc...
Thanks Andrew for the

Thanks Andrew for the feedback.

We know that how it is implemented at this moment is not optimal and we're looking into the available options for the future.

At this moment the Barcode API it's already implemented in this way, using as the default scanner the available HW device. The problem is limited to the Scanner API that is implemented on an older codebase.

Thanks again for the patience.

Ciao

~Pietro

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Andrew Pengelly
We have ben advised by tech

We have ben advised by tech support to try the following DOM injection method.  Pietro is this the method you used?  The first line of the metatags.html file looks key. 

First create a file metatags.html which contains the following two lines

                <meta HTTP-Equiv="Scanner" Content="Disable" pages='*'/>

                <meta HTTP-Equiv="Scanner" Content="Enabled:SCN2" pages='*'/>

Second add the following tag for DOM Injection into the CONFIG.XML file.

               <CustomDOMElements value="file://%INSTALLDIR%/metatags.html"/>

Finally ensure you remove any old scanner metatags from the CONFIG.XML file.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Edward Correia
Andrew- I'm glad you were

Andrew- I'm glad you were able to get this working. Thanks for emailing the solution that IT provided. I am posting it below so that perhaps it might help others.

Tech support advised us to use the following DOM injection method.  The first line of the metatags.html file looks key and had never been mentioned previously. 

1. First create a file metatags.html which contains the following two lines:

                <meta HTTP-Equiv="Scanner" Content="Disable" pages='*'/>

                <meta HTTP-Equiv="Scanner" Content="Enabled:SCN2" pages='*'/>

2. Second, add the following tag for DOM Injection into the CONFIG.XML file:

               <CustomDOMElements value="file://%INSTALLDIR%/metatags.html"/>

3. Finally ensure you remove any old scanner metatags from the CONFIG.XML file.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Siegmund Leducq
While this is a working

While this is a working solution to my most urgent problem, I'm still left with a closely related issue:

How can I disable and then enable the scanner again from Javascript? The initial injection method initialization seems to be overwritten by the disable() and won't restart after enable()?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Hi Sigmund,this discussion

Hi Sigmund,

this discussion was about moving and existing Symbol Pocket Browser application (using the Scanner MetaTag API) to TC8000 with Enterprise Browser.

If you're implementing a new software solution or you can modify an existing solution, you don't need to inject something in the normal webpages flow. You can simply develop your app using the Barcode API.

Ciao

~Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Siegmund Leducq
Thanks for your swift reply

Thanks for your swift reply.

Unfortunately, I tried using the api in about every way I could think of but I wasn't able to select a scannerobject to activate. For some reason, the trigger always triggered the camera, whatever I tried...

Extra info: enumerating returns an array with 3 empty objects, so it's hard to reference any one of them -> [{},{},{}]

If you know the right way to do it, please do tell!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Hi Sigmund,Barcode API

Hi Sigmund,

Barcode API default scanner object is the Imager or Laser scanner on all Android devices. It's only the Scanner API that defaults to the camera.

So, few suggestions:

  1. Be sure that you're using the latest EB released version (currently 1.4)
  2. Take a look at the feature demo on Launchpad
  3. Take a look at the official tutorial on Launchpad
  4. Here's a simple barcode API demo​ that we use during our Developer workshops across EMEA (we've few planned for September/October).

If you've a more specific question, we can take a look at your code.

~Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Siegmund Leducq
I'm afraid this isn't the

I'm afraid this isn't the case for the tc8000. It DOES default to the 8MP camera, as Andrew Pengelly also posted earlier on in this thread:

"We have a TC8000, full part number TC80NH-2101K420NA, which has both SE4750MR scan engine PLUS 8 MP camera.  Our challenge is that when attempting to scan a barcode within Enterprise Browser the trigger action appears to activate the camera instead of the SE4750MR scan engine."

In other words (and in code as you asked) EB.Barcode.enable(...) starts the camera, not the scanner.

If I could enumerate the scanners I could do therightscanner.enable() but, as I said, enumerating yields an array with 3 empty objects...

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Ok Sigmund,sorry but I didn't

Ok Sigmund,

sorry but I didn't understood that. Even because Andrew had the issue using the Scanner API not the Barcode API.

They've two different implementation and, unfortunately, two different defaults.

Did you get the same behaviour (defaulting to the camera) even with the demo applications?

Would be helpful to have information like BSP version (that you get under settings->about device->build number) and EB version.

~Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Siegmund Leducq
Hello again PietroI'll try

Hello again Pietro

I'll try the demoes and let you know whether there's any change.

     Verified and the demoes act the same way...

In the meantime, the data you asked for:

build: 01-23257-K-01-54-00-MV

eb: 1.4.0.0

HOWEVER

I found a solution for my problem so no further action needed.

Thanks, Sig

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Siegmund Leducq
By the way, does anyone have

By the way, does anyone have a link to a reference for dom injection syntax?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Peter Arcuri
You may find this blog on DOM

You may find this blog on DOM Injection helpful.

Power of DOMInjection (example with NativeTabBar)

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
By the way, does anyone have

By the way, does anyone have a link to a reference for dom injection syntax?

EB v1.4 Dom Injection Guide

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments