Help a Newbie!!!

Hello,

I am in trouble with a TC55. I would like to show some scanner feature ( like continous scan)

but unfortunately with Datawedge demo we don't have a lot of option for set the scanner

 

So I though maybe I can use EB

 

I have tried 2 samples

 

the tutorial  ==> Sorry but it doesn't work  nothing happen when I press the scan button

second sample ==> API reference ==> Scanner ==> Example  ==>  It doesn't work as well  ( when you click on button nothing happen)

 

So somebody can give me example/Tuto that works properly?

 

In attach file my sample

 

regards,

 

Sébastien

Glenn Sayer
Continues scanning is not

Continues scanning is not available on Android devices.  The way you code around this is to use DW Intents, Android EMDK, RhoMobile, or Enterprise Browser by starting the scanning and setting the timeout value to zero so that the scanner stays on until a barcode is read.  Once a barcode is read then the application will start the scanning again via a command to the scanner to start scanning.

I done what you are looking for with all of the above options and in the end comes down to what tools you are comfortable in using.

I attached two samples that you should show you how its done.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Sebastien Laporte
Hi Glenn,thanks for your

Hi Glenn,

thanks for your help

when you say not available, you mean not yet implemented?

but the method exist so why it is not available?

I have test your sample, but the barcode scanner doesn't work

How we need to declare JS library?

<script src="api/rhoapi-modules.js"></script>    

I need to add this one

<script type="text/javascript" charset="utf-8" src="eb.barcode.js"></script>

but where is the folder of all JS files?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Sunil Kumar
Hi Sébastien,The way you have

Hi Sébastien,

The way you have included the js file in your script is correct. But you don't need to include module specific js file (eb.barcode.js) if you are including the ebapi-modules.js which is for all features.

The js files are to be copied to the device manually and as per your test page the js file should be in the same location as your index.html file.

All the JS files are available with the EB Desktop installer.

"C:\EnterpriseBrowser\JavaScriptFiles\EnterpriseBrowser"

I just checked the same with your script on MC40 unit.

Created a new folder called "Test" at the root of the SD card and put your index.html and the required JS file into that folder.

Modified the Config.xml -->StartPage to point to that location.

<StartPage value="file:///storage/sdcard/Test/index.html" name="Menu"/>

And run EB.

I am able to scan by pressing the trigger.

Pls try that out and let me know if that works for you or not.

Thanks

Sunil

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Glenn Sayer
In the documentation you need

In the documentation you need to look at the "Platforms" section to make sure this API/Method can be done on the desired platform.

As for the Rho ref.  My mistake as this was code written back when EB was Rho.  You just have to change all of the Rho ref to EB and use the ebapi-modules.js

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Sebastien Laporte
thanks,now it's works fine!

thanks,

now it's works fine!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Sunil Kumar
That's Great.

That's Great.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Sebastien Laporte
last thingit is possible to

last thing

it is possible to add a field for see what we scan in this sample?

Thx

Seb

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Sunil Kumar
You want to show the scanned

You want to show the scanned data inside an input field? Its similar to how you are currently showing the scanned data in the DIV tag.

Check the attached file. Hope that's what you wanted.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Helmut Reichhold
Hi Glenn,I just started to

Hi Glenn,

I just started to migrate my application from PocketBrowser to EnterpriseBrowser 1.1.
I use for testing a WT41N0.

I tried to get your example running, but it seems that all calls to EB fail.
I have added my HTML, Config.xml, and ebapi-modules.js

I would be glad to hear from you.

Regards,

Helmut

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Glenn Sayer
Helmut,Where did you get the

Helmut,

Where did you get the ebapi-modules.js?  This looks like it is the Rho file.  You need to grab the one the comes with the EB install.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Helmut Reichhold
Glenn,I used the download

Glenn,

I used the download from Business Support - Motorola

The file is from C:\EnterpriseBrowser\JavaScriptFiles\EnterpriseBrowser

The files in the directory have all the timestamp 01/28/2015 20:00 (see zip file in the attachment)

In the folder C:\EnterpriseBrowser\JavaScriptFiles\BackwardCompatibility exists a file called rhoapi-modules.js with the exact same content.

On the device I find in the directory \Application\EnterpriseBrowser\rho\apps\public\api a set of identical eb.*.js and rho.*.js files

Is it possible, that the download contains the wrong files?

Could you send me a file with the correct content?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Glenn Sayer
Helmut,Yes it looks like this

Helmut,

Yes it looks like this might be the wrong file.  attached is an older version of the file.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Helmut Reichhold
Glenn,I have still no success

Glenn,

I have still no success.

When I start the application, I see only the first Alert message

alert('about to enumerate scanners');

enumerateScanner();

alert('scanners enumerated: ' + scanners);

enableScanner(); 

Do you have a working example (with all files) which should run on my device and with EnterpriseBrowser 1.1.?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Glenn Sayer
please look in the

please look in the documentation.

command is EB.Barcode.enumerate()

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Helmut Reichhold
Glenn,my last code fragment

Glenn,

my last code fragment was related to the example application you have posted earlier.

I have tried again the example in the documentation (file:///C:/EnterpriseBrowser/Documentation/HelpFile/index.html#guide-tutorial-helloeb) with your ebapi-modules.js.

But it still does not work. The DataWedge Demo works, i.e. the hardware works.

I am out of ideas, what to do.

That is the  reason, why I asked for a working example for the EnterpriseBrowser1.1 (webkit persistent) including all JavaScript and Config.xml files.

Or is it possible to get more debug information?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Glenn Sayer
can you share your code?

can you share your code?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Helmut Reichhold
See  my example in the

See  my example in the attachment.

I have tried to use ebapi-modules.js and ebapi.js with eb.barcode.js. But I have no success with either variant.

I have also added the Config.xml. Perhaps there is a setting which disables the JS interface?

Thanks

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Glenn Sayer
Helmut,is there a reason you

Helmut,

is there a reason you are not using the ebapi-modules.js that I posted?

Please try with it and let me know what you get.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Helmut Reichhold
Glenn,I have added my example

Glenn,

I have added my example again using the original ebapi-modules.js you have posted. (The file in my last post only contained an additional alert debug message).

It still does not allow me to scan.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Glenn Sayer
Helmut,I will not be able to

Helmut,

I will not be able to test this for a few days. Wondering if you can turn debugging on and run this program and send me the log output?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Glenn Sayer
Helmut,what device are you

Helmut,

what device are you trying to do the scanning with?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Helmut Reichhold
Glenn,I have a WT41N0

Glenn,

I have a WT41N0 terminal and a corded RS507 scanner.

What do I have to do to turn debugging on? Do you mean setting up WEINRE ?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Glenn Sayer
OK,  that is your problem. 

OK,  that is your problem.  External scanners cannot be controlled this way.  External scanner control must be done thru the serial port and ssi commands. 

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Helmut Reichhold
Glenn,I could not find

Glenn,

I could not find anything helpful in the EnterpriseBrowser documentation (I found just a few hundred pages of low level .documentation for C).

Here a running example would be really helpful.

Or is the combination with a corded scanner not feasible?

Should I use a Bluetooth scanner (There seems to be support for this in the barcode API)?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Glenn Sayer
Helmut,See the below link. 

Helmut,

See the below link. 

The scanner must be connect to the device via BT connection and have SSI mode enabled.  Then you can leveraged the Barcode API to control the scanner.

https://developer.motorolasolutions.com/docs/DOC-2510

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments