Disable scanning while processing barcode scanned.

// Expert user has replied.
R Richard Hill 3 years ago
3 1 0

My application needs to scan a single barcode, then act upon that barcode which involves an API call to our application server, wait for a response, possibly show an alert if necessary, otherwise allow scanning of the next barcode.
 
What I'm currently doing on our TC8000 is calling scanner.Disable() in the event listener for a barcode scan, then after I'm done processing the barcode, calling scanner.Enable().  I don't want users to be able to scan while the app is processing the last scanned barcode.
 
I'm running into an issue with rapid scanning, that I sometimes get an exception that the scanner is disabled.  I would speculate that scanner.Enable() and scanner.Disable() are expensive calls and I'm running into an issue where the scanner hasn't completed its Enable() function and I'm trying to access it.
 
What is the best practice for preventing additional scans while the scanner is processing the current scan?

Please register or login to post a reply

1 Replies

G Glenn Sayer

I would be faster to change disable and re-enable the barcode types allowed.  the only issue with this is the scanner will come on but will not decode and this could confuse some users.  Another option is to scan the barcode but give the user a different sound until it is ready.

CONTACT
Can’t find what you’re looking for?