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-fle x-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
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.
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
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.
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.
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
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.
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
North America
Europe, Middle East and Africa
Asia Pacific