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
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.
Points: 1
You voted ‘up’
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?
Points: 0
You voted ‘up’
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
Points: 1
You voted ‘up’
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
Points: 0
You voted ‘up’
thanks,
now it's works fine!
Points: 0
You voted ‘up’
That's Great.
Points: 0
You voted ‘up’
last thing
it is possible to add a field for see what we scan in this sample?
Thx
Seb
Points: 0
You voted ‘up’
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.
Points: 0
You voted ‘up’
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
Points: 0
You voted ‘up’
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.
Points: 0
You voted ‘up’
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?
Points: 0
You voted ‘up’
Helmut,
Yes it looks like this might be the wrong file. attached is an older version of the file.
Points: 0
You voted ‘up’
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.?
Points: 0
You voted ‘up’
please look in the documentation.
command is EB.Barcode.enumerate()
Points: 0
You voted ‘up’
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?
Points: 0
You voted ‘up’
can you share your code?
Points: 0
You voted ‘up’
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
Points: 0
You voted ‘up’
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.
Points: 0
You voted ‘up’
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.
Points: 0
You voted ‘up’
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?
Points: 0
You voted ‘up’
Helmut,
what device are you trying to do the scanning with?
Points: 0
You voted ‘up’
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 ?
Points: 0
You voted ‘up’
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.
Points: 0
You voted ‘up’
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)?
Points: 0
You voted ‘up’
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
Points: 0
You voted ‘up’