Barcode API "autoEnter" property is not honored in Android when Android wakes

S Saad Nisar 2 years 11 months ago
4 1 0

We are facing very strange result in Android. Our application and set of text boxes that needs to be scanned we have set application to focus to next text box when "Enter" key is pressed. Since our SOP is to not let operators touch the screen during this process, we set "EB.Barcode.autoEnter = true" which works fine until Scanner sleeps and awakes again.
We are using Android MC9200
 
Following is the test code which proves (when tested on Android) that "EB.Barcode.autoEnter = true " is not being honored when android awakes.
 
 

    Text1 :
   
    Text2 :
   
    Text3 :

   
    function EnableScanner(enabled) {
            if(enabled) {
                try {                      
                        EB.Barcode.autoEnter = true;
                        EB.Barcode.enable();                   
   
                 } catch (e) { alert(e.message); }
             }
             else { try { EB.Barcode.disable(); } catch (ex) { alert(ex.message); } }  
     }
    
   
 
 
    $(document).ready(function(){
          EnableScanner(true);
          $('.inputs').keydown(function (e) {
              if (e.which === 13) {
                   var index = $('.inputs').index(this) + 1;
                  $('.inputs').eq(index).focus();
              }
         });  
         $("#firstItem").focus();       
    });   
   
   

Please register or login to post a reply

1 Replies

S Saad Nisar

As workaround I am using
setInterval(function(){EB.Barcode.autoEnter = true;},200);

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