16 Replies Latest reply on Aug 14, 2013 12:17 AM by Paresh Patil

    iOS Mobile App, Flex 4.6, QR-Code reader...

    Laurence MacNeill Level 1

      Has anyone ever been able to actually get an iOS QR-Code reader app to work correctly?  I've looked at literally DOZENS of blog-posts -- they're all based on two posts (http://www.remotesynthesis.com/post.cfm/adding-a-qr-code-reader-in-flex-on-android and http://www.libspark.org/wiki/QRCodeReader/en) so they're all pretty much the same -- and NONE of them seem to work on a 5th generation iPod Touch with iOS 5.1 and Flex 4.6 (the examples are all Android devices and Flex 4.5.1).  I've tried every last permutation of each of those two posts that I've found, and read every comment on all of them, and I can't get any of them to work at all on this stupid iPod Touch...

       

      So -- has ANYONE written a FUNCTIONAL qr-code reader for an iOS device using Flex 4.6?

       

      Any help you can give would be appreciated...

       

      Thanks,

      Laurence MacNeill

      Mableton, Georgia, USA

        • 1. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
          iBr3nt Level 3

          Hi,

           

          Yes, I've got QR code reading working on iOS using Flash Builder 4.6. It works fine for me on my iPhone 4, and iPad 3. What problems are you having specifically?

           

          iBrent

          • 2. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
            Laurence MacNeill Level 1

            Well, the libspark.org library I linked above never even compiles -- way too many errors to list here...  I've gone through all its source-code and still can't get rid of all the errors, so I gave up on it...  This seems like it would be a great library, if I could get it to compile successfully, but as it is, it's not going to work.  (EDIT: If anyone out there actually *has* gotten this library to work with Flex 4.6, please let me know how you did it, thanks.)

             

            The code from the remotesynthesys.com post will actually complie, and display the video and everything, but when I click the button to take the picture it just sits there for about 5 seconds (maybe a bit more), then comes back with "nothing decoded."  It simply *never* decodes the bar-code.  And it's *extremely* slow, even when I do the slow, highly-optimized compile.  Its performance is not good at all, even if it were decoding successfully...

             

            Do you have any source-code I can see?  Are you using the ZXing library to decode, or a different library?

             

            Thanks,

            L.

            • 3. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
              iBr3nt Level 3

              I'm using ZXing and it isn't slow for me (certainly not 5 seconds to process). I haven't tried libspark. Let me put together an example based on an app I've written (haven't released it for iOS yet ;-).

               

              iBrent

              • 4. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                Laurence MacNeill Level 1

                That will be amazingly helpful, thank you...

                 

                Thanks a bunch,

                L.

                • 5. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                  iBr3nt Level 3

                  I've posted an example .fxp project based on the remotesynth.com example. You can download the Flash Builder 4.6 file here --> http://www.tutorialsbyibrent.com/assets/QRReader.fxp

                   

                  One thing I didn't try in order to speed up this example is to comment out the System.gc(); calls to see if that helps.

                   

                  iBrent

                  • 6. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                    Laurence MacNeill Level 1

                    Didn't work...  Exactly the same thing -- nothing decoded...

                     

                    I wonder if the camera on the iPod Touch is not good enough to read QR-Codes?  Maybe there's something set up incorrectly in my Flash Builder?  I'm running on Windows and you're running on a Mac, yes?  Maybe that's the problem...  I have no idea at this point...

                     

                    If you've got any other ideas, I'm all ears....

                     

                    Thanks a bunch for your help so far.

                     

                    L.

                     

                    EDIT:   After re-trying about 20 or 30 times, I finally got it to scan ONE bar-code...  So, yeah, I guess it does work, just not very well -- at least on the 5th-gen iPod Touch...  It's got to be a camera issue, I believe.

                    • 7. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                      Laurence MacNeill Level 1

                      Ok -- I've done some more messing around with the libspark.org library I linked above...  When I run it on the emulator, I've finally gotten it to the point where I get no bugs (but my web-cam can't focus near enough to scan the bar-codes, so I'm still unable to scan on the emulator, even though there are no bugs...)

                       

                      When I run it on the iPod Touch, the following error pops up in the library's AdaptiveThresholdFilter.as file, line 62: "Error #1010: A term is undefined and has no properties."   Why would this give me an error on the device, but not on the emulator?  What is missing here?  Can someone check out the libspark.org library I've linked above and tell me what I'm missing?  It's very weird that it would not give an error in the emulator, but would give it to me on the device itself...

                       

                      Thanks,

                      L.

                      • 8. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                        iBr3nt Level 3

                        Hmmmm, well I don't have an iPod Touch to compare with, but I know that

                        the code works on my iPhone 4 and iPad 3. Sometimes I have to scan the

                        code a few times, moving the camera slightly to fit the code into the

                        video area. Blurry codes won't decode well either. Have you downloaded

                        other QR apps and tested those on your device? Maybe it is the camera

                        that's the problem.

                         

                        iBrent

                        • 9. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                          Laurence MacNeill Level 1

                          Yes, I've checked a couple of free QR-Code reading apps on this iPod Touch -- they all seem to work OK.  Not perfectly, but OK...  Far better than anything I've written, that's for sure.  :-)

                           

                          The camera is definitely a problem, though -- that's why (I'm sure) the basic ZXing decode library isn't working well...  It needs something more -- which is what the LibSpark library provides...  And that's why I'm trying (again) to get this LibSpark library working...

                           

                          I've narrowed down the problem to a file called AdaptiveThresholdFilter.as, which has a line in there that embeds a file called adaptiveThreshold.pbj -- this .pbj file is an Adobe Pixel Bender file (or something like that, anyway).  It seems that this file is not actually embedded into the package that gets exported to the mobile device, so when the app runs on the device, it fails because it can't find that file...

                           

                          So, I guess my new question is this:  How does one embed a .pbj file into a mobile app?  I _hope_ that if I can figure that out, this LibSpark library will work, and my problems will be solved...  I hope...

                           

                          L.

                          • 10. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                            David_Welch Level 1

                            Lawrence:

                            Any look doing thiw with LibSpark?

                             

                            I'm trying to do the same thing for mobile, have iBr3nt's code working, but, it takes a lot of tries to get the QR to be recognized.

                             

                            Thanks,

                            David

                            • 11. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                              Laurence MacNeill Level 1

                              No, I've had no luck with LibSpark, unfortunately... It would be nice if LibSpark would work for me, because it seems like a great library, but it's just too darn slow on this iPod Touch that I'm working with...

                               

                              L.

                              • 12. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                                marciofermino Level 1

                                Friend's please I need one example for reader code bar.

                                 

                                Please enter contac skype marciofermino

                                 

                                I type from Brazil.

                                Thank's.

                                • 13. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                                  AntuanSoft Level 1

                                  The project (http://www.tutorialsbyibrent.com/assets/QRReader.fxp) has been imported and compiled in a Flex 4.6 builder and compile perfect. Then it has been tested in the emoulator and works!!!! and instaled un a Android 2.3.6 and works perfecty (the camera and the qr recognition).

                                   

                                  Thanks!!!!! Ibrent

                                  • 14. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                                    Paresh Patil

                                    Hi Friends,

                                     

                                    I have also used the zxing library and my application is working in Android properly.

                                    But I am having problem while scanning it takes time to scan.

                                    Is there any way to scan the image sharply and can i we have any zoom functionality in the application.

                                     

                                    Please guide.

                                    Thanks.

                                    • 15. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                                      marciofermino Level 1

                                      You can sen one little example ?:

                                       

                                      Thank you.

                                       

                                      Em 02/08/2013, às 02:35, Paresh Patil <forums_noreply@adobe.com> escreveu:

                                       

                                       

                                      Re: iOS Mobile App, Flex 4.6, QR-Code reader...

                                      created by Paresh Patil in Flex - View the full discussion

                                      Hi Friends,

                                       

                                       

                                      I have also used the zxing library and my application is working in Android properly.

                                       

                                      But I am having problem while scanning it takes time to scan.

                                       

                                      Is there any way to scan the image sharply and can i we have any zoom functionality in the application.

                                       

                                       

                                      Please guide.

                                       

                                      Thanks.

                                       

                                      Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5560646#5560646

                                      Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5560646#5560646

                                      To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5560646#5560646. In the Actions box on the right, click the Stop Email Notifications link.

                                      Start a new discussion in Flex by email or at Adobe Community

                                      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

                                       

                                      • 16. Re: iOS Mobile App, Flex 4.6, QR-Code reader...
                                        Paresh Patil Level 1

                                        Hi Thanks for the reply.

                                        I have used the same above .fxp file provide by iBrent.

                                         

                                        Thanks.