3 Replies Latest reply on Jan 24, 2019 4:15 AM by Matt Dermody

    Android Scanner not working after SCREEN OFF

    Mar Gur

      Hello

       

      I follow the samples and have a working app to scan barcodes on two different activities.

       

      If the TC51 is connected via cable, everything is working fine.

      *) Scanning in Activity 1

      *) Scanning in Activity 2

      *) Screen OFF (hardware button: off)

      *) Screen ON (hardware button: on)

      *) Scanning in Activity 2

      *) Scanning in Activity 1

       

      => works

       

      If the TC51 is NOT connected via cable, after Screen ON event I get no scan result

       

      *) Scanning in Activity 1

      *) Scanning in Activity 2

      *) Screen OFF (hardware button: off)

      *) Screen ON (hardware button: on)

      *) Scanning in Activity 2 NOT WORKING scanner state log output seems to be correct

      *) Scanning in Activity 1 NOT WORKING scanner state log output seems to be correct

       

      If i have a valid scan i see two lights on top of the device (one smaller orange one, one bigger red one)

      If i turn the screen off without connected cable only the smaller organge one is visible - the other one is not working. To get the second one working I have to restart the app.

       

      What can be the reason for this behavior?

        • Re: Android Scanner not working after SCREEN OFF
          Matt Dermody

          How are you handling scanner integration? DataWedge or the EMDK? You may consider switching to DataWedge based "integration" if using the EMDK.

            • Re: Android Scanner not working after SCREEN OFF
              Mar Gur

              Hello

              Im using the EMDK.

               

              I dont know if it is possible to use DataWedge for my use case (?)

               

              I have to initiate the scan mechanism on two (or more) different screens by hardware button and  the user should not have to create a profile manually (only app install should be to do at users side)

               

              Is this "orange light and no red light" thing a bug in EMDK?

                • Re: Android Scanner not working after SCREEN OFF
                  Matt Dermody

                  I would take another look at DataWedge. It is going to do a better job of scanner initialization and handling than trying to leverage the EMDK and I'm fairly certain that is the direction that Zebra is pushing us toward. If you check out the Techdocs website you will see that DW now supports a significant number of Intent based APIs that would allow your application to control it's behavior including the ability to create a profile. Your app could check DW for profiles upon initial launch and then set the profile automatically if one isn't detected. This would require no additional end user manipulation of DataWedge.