6 Replies Latest reply on Aug 18, 2015 11:09 PM by Tobias Kiefer

    Scanning ITF Codes with the Camera

    Tobias Kiefer

      Hello everyone,


      I would like to scan ITF Barcodes using the Camera on an Android device.

      I have set Barcode's allDecoders to true such that i2of5 should be enabled as well (I also tried to enable i2of5 manually). However, the code simply won't be decoded.


      To be able to scan those codes with a WM PDA's hardware scanner I had to set the following default values manually:

      Rho.Barcode.i2of5minLength = 1;

      Rho.Barcode.i2of5maxLength = 55;

      However, this did not do the trick on Android using the camera.


      As rhomobile uses zxing as scanning engine, I also tried the demo app on the device directly (ZXing Test - Android Apps on Google Play). Using this app I can scan ITF codes.

      This shows that zxing can actually scan the code.


      Any hints why the decoding won't work are appreciated.




        • Re: Scanning ITF Codes with the Camera
          Robert Galvin

          What device is this? For Zebra devices we do not use Xing. jrq768 may have some suggestions as well.

            • Re: Scanning ITF Codes with the Camera
              Tobias Kiefer

              Thank you for the quick answer.

              I tested it on both an EPSON Moverio BT-200 and a SAMSUNG Galaxy Note 3. It did not work on either of those.

                • Re: Scanning ITF Codes with the Camera
                  Robert Galvin

                  We probably have an older version of Zxing library included. I do not think we have a documented way to update it, but Darryn may have more info.

                    • Re: Scanning ITF Codes with the Camera
                      Jared Thigpen

                      Any chance of getting an update on this? We have a suite of apps that are centered around barcode scanning, and Android camera is the only integration we have that won't scan ITF barcodes. I can open a ticket with support if you think that's the best route to take.

                        • Re: Scanning ITF Codes with the Camera
                          Robert Galvin

                          Hi Jared,


                          You can try opening a ticket, but likely since this is an enhancement request, it will get put on the backlog and not sure when/if it would get done. For Zebra devices you have some other choices like a DataWedge approach.


                          For non Zebra devices, I think your options could be:


                          1) Write a native extension for the current ZXing library yourself.

                          2) Write your own "Datawedge" like Android application using ZXing Android library and then send an intent that your RhoApp is listening for.

                            • Re: Scanning ITF Codes with the Camera
                              Tobias Kiefer



                              I did the native extension approach.


                              I managed to get it working, however, not with the intended approach of giving the function a js callback. In my opinion the reference is extremely bad when it comes to callbacks. Could you update the reference to give a little more detail? For example I do not understand when the callback is invoked. If it is invoked when the method returns, there is no result available yet as I just started an Activity for scanning. If I do a wait notify mechanism to wait until I have a result, the whole app becomes black and dies. Can I somehow manually determine when the callback should be invoked?


                              What I did as a quick fix was to run a simple http server in Java and do long poll from js. This works, but is not pretty at all compared to a js callback. So I am still interested in the proper way in case you can give me more detail on how it is supposed to work.