5 Replies Latest reply on Jul 31, 2017 1:48 AM by Tobias Heindl

    Autoenter after Suspend / Hibernation disabled

    Tobias Heindl

      Hello, we are developing for Android-Device TC8000 with Enterprise Browser.


      We have encoutered a problem if the Device wakes up from Suspend / Hibernation with the Enterprisebrowser still open.


      The Scanner takes a short while to become active again ~10 - 20 Seconds the AutoEnter is not working.


      First we tried to solve it with the EB.Barcode API but havent found a OnWakeup event or something like that.


      Then we used the rhoapi-modules.js and elements.js API  with Metatags:


      <META HTTP-Equiv="scanner" Content="Enabled:SCN2">

      <META HTTP-Equiv="scanner" Content="AutoEnter:Enabled">

      <!--   <META HTTP-Equiv="scanner" Content="Start"> -->

      <META HTTP-Equiv="scanner" Content="picklistMode:hardwareReticle">


      We changed the EB.Barcode to the "scanner" equivalent.


      scanner.enabled = 'SCN1';

      scanner.autoEnter = 'enabled';


      Now the AutoEnter works, but the Scanner ist still deactivated for ~10-20 Seconds until you can Scan again.


      Is there a way to increase the Performance to Wakeup the Scanner?

      Do we have to use the rhoapi-modules to solve the Autoenter Problem? I am asking this since ZEBRA suggests to use the EB. APIs.


      Thanks in advance!

        • Re: Autoenter after Suspend / Hibernation disabled
          Darryn Campbell

          Hi Tobias,


          You should not have to do anything special when the device wakes up, Enterprise Browser should re-enable the scanner for you and ensure it is correctly configured.  I know Android M devices have an additional scanner sleep mode however since your device is Android 'L' that would not be a problem here.


          I recommend you ensure you are only using either the scanner API or the Barcode API, you should not mix the two and doing so could confuse the underlying scanner hardware possibly leading to the delay you describe.

          Barcode API is the recommended approach since it is more modern: Barcode - Zebra Technologies TechDocs   If you are going down the Barcode API route then please remove all scanner meta tags, javascript code and instances from your config.xml file.  If autoEnter is not working then it could indicate the Barcode API is not responsible for enabling the scanner, i.e. it could be the older API in your code somewhere.


          Incidentally, "Then we used the rhoapi-modules.js and elements.js API  with Metatags:"... you would not need rhoapi-modules.js to use the scanner APIs, only elements.js.


          There is a powerOn event which will be called when the device wakes: PowerOn Module - Zebra Technologies TechDocs  but as I say, this is not something your application should have to worry about when controlling the scanner.


          Do you see any suspicious logcat messages when you come out of suspend?

          • Re: Autoenter after Suspend / Hibernation disabled
            Mukesh Prabhakar

            Hi Tobias,


            In Enterprise Browser 1.7, the EB.Barcode API takes only ~1 sec to enable the Barcode and it also depends on the number of properties calling inside enable() method.


            We have fixed a similar issue in Enterprise Browser 1.7 and our recommendation will be to use EB.Barcode API that will give more configurable methods.


            Kindly Download the latest EB binary from below link and try the same.




            Please share the EB, EMDK and BSP version details if the issue is reproducible again.



            Thanks & Regards

            Mukesh Prabhakar

            Enterprise Browser Software Engineer

            • Re: Autoenter after Suspend / Hibernation disabled
              Tobias Heindl



              I am using Enterprisebrowser 1.6 on Android 4.4.3 (TC8000).


              I have Checked my Config.xml. There are no Default-META-Tags active.


              I have ensured that I am only using the following Scripts

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

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

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


              I have created a mini-App which I debugged with Chrome Inspector:





              But if I awake from Suspend there is:





              Is there something I have missed?


              Thanks in advance!

                • Re: Autoenter after Suspend / Hibernation disabled
                  Darryn Campbell

                  Hi Tobias,


                  Can you please try with Enterprise Browser 1.7?  Unless you are disabling the scanner yourself during suspend that sounds like a bug and if Prabhakar is saying they fixed a bug with 1.7 then perhaps it is the same issue.


                  You will not need to change your application and the license key is identical between 1.6 and 1.7 so hopefully it should be a simple swap out of the device APK.  The config.xml will also be compatible so make sure you take a back-up of your configuration before upgrading and then just copy it back to the device after the update.

                • Re: Autoenter after Suspend / Hibernation disabled
                  Tobias Heindl

                  The Update to Enterprise Browser 1.7 worked!


                  Now it saves the autoEnter (and PICKLIST_HARDWARE_RETICLE) property.


                  The Scanner wakes up after ~1 Second like Prabhakar explained.


                  Thanks for your support!