2 Replies Latest reply on Sep 26, 2016 9:14 AM by Richard Hill

    Disable scanning while processing barcode scanned.

    Richard Hill

      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?