Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Hi spadix! Great program!
The iPhone App can enable us to build some really cool web applications. There are only a few features missing in order to do that:
1) Turn on the flashlight while trying to find a code with the camera. I am aware that this eats battery life, but it would improve the recognition speed and quality significantly. We tested it with a second iPhone illuminating the field. An option could enable the user to turn the flashlight off.
2) Declare a new protocol for Safari, which may be called "zbar://". Other apps use this and it works beautifully. The URL could contain parameters (like flashlight on/off). This protocol would use the camera and, after having read a code, would return the symbology and content.
3) Expose the F1-Separator in Code-128 (for instance as char 0x1d), so apps can decode EAN-128 (aka GS-1)
I believe (…) that the features are relatively easy to implement, with the possible exception of number 2, but still I am aware that I'm asking a lot.
I would be glad to help, but having neither a Mac OSX machine nor an iPhone SDK means I would be contributing untested, even uncompiled code, which might be more trouble than it's worth.
Any feedback on this is greatly appreciated. Keep up the good work!
Thanks for the cool barcode reader
1. This is already supported in the SDK. It should be available in the next version of the app…
2. I never thought there would be a use for it with this app, but I guess you did say "web applications". I will consider adding it to the ZBar app… From a web app dev perspective, what's the easiest structured data format to grok results? JSON?
3. Yeah, that's been broken for a long time and really should be fixed… It would be great if you could open a bug report to track it!
Thanks for the insightful feedback; very useful!
Thanks for the quick reply! Concerning integration in a web application (item 2), JSON-formatted results would be great!
I imagine a test application using an XMLHttpRequest (or jQuery, or else) to call zbar (with something like "zbar://<args>"), then using the result to dynamically update or perform other actions. This would make a great universal interface for all those silly shopping applications, but more importantly, it would enable serious barcode driven workflows.
Concerning item 3: I just downloaded the Linux sources and will look into the Code128 section, perhaps I can come up with something… I'll open a bug report ASAP to track the results.
Getting a little confused here wrt web app integration, maybe you can elaborate on a few things:
> after having read a code, would return the symbology and content.
What is the proposed mechanism for returning to the invoking app? The only reference I can find for returning to the caller is by having zbar invoking a return URL - not sure if that's going to be flexible enough, esp considering your mention of XMLHttpRequest…
> Other apps use this and it works beautifully.
Can you provide some examples? A couple of open source examples would be great…
> I imagine a test application using an XMLHttpRequest …
I leave any test apps up to you :)
> … then using the result to dynamically update or perform other actions.
AFAIK, there is no way to return data from a custom URL request to be used the way you describe… Maybe you can fill in the pieces I'm missing?
Thanks for researching this. I have no access to Apple's API documentation, so I simply don't know how this integration must or can be done. The only reference I have is an app called "redlaser" (a non-OSS competitor of yours who doesn't (yet?) integrate EAN-128), for which I've written a very simple example. (So I shouldn't have said "Apps", it's only one). This app uses URL transmission, as you describe, and opens a new page for each code transmitted. After a while, Safari decides it's better not to open any more pages, and each new code opens in Safari's last page. This works, but it is not the pinnacle of elegance, so I was glad when you suggested JSON, which sounded like there may be a better way of doing things.
The code I use to invoke redlaser looks like this:
<form action="redlaser://" method="get">
<input type="hidden" name="return" value="http://my.scanner.application.com/path/to/method">
<input type="hidden" name="param" value="q">
Redlaser puts the scanned code behind the URL as parameter q, and calls Safari with that. So, it looks like you're missing no pieces at all. I just got a little over-euphoric at the sound of "JSON". But the iPhone APIs seem to be limited to what you've found out.
Still, the method is worth implementing. Calling a custom URL from withing ZBar is one thing, but triggering the next scan from a web app allows a closed loop, which is nice.
Thanks again for all your efforts, and for your patience with my not-100%-accurate statements!
> I was glad when you suggested JSON, which sounded like there may be a better way of doing things.
Sorry about that, I was still trying to figure out what was going on…
I also saw some other apps that are using the URL response hack… I can look into adding something to the app.
Thanks for an excellent app!
Relating to the current discussion, Picup is an app that permits you to:
1. Click a link in mobile safari to launch the app.
2. Choose a photo from the device or take a new photo with the camera.
3. Upload the image via POST.
4. Return control to the original safari window that began the sequence.
Such functionality would be an excellent addition to Zbar.
Watch the video and explore the API at picupapp.com
I'm just adding a vote for this feature. pic2shop has it, but the support for codes is very lacking. I _will_ switch to zbar when it gets this!
redlaser doesn't seem to work anymore - wrt opening safari with a URL that contains a parameter with the UPC value.
It would be great if zbar would provide this functionality.
Pic2shop PRO will replace the strings "EAN" or "UPC" with the barcode digits. (Unable to use it with barcode 128…)
And RedLaser is not working anymore…
Please Add that feature to zbar!!!
Rune Terkel Joergensen
Is there any news about supporting the callback function like Pic2shop, or iCody
Zbar://<function type>?<callback function call> I am using Filemaker Go.
The scan tests I have made with Zbar, is working very fine, and the program is very quick to scan the barcode.
ZXING has the feature similar to this, but it can only do QR codes on ios, but on android it can do all the codes. On ios its
I am not seeing a recent responce to this discussion, I too am looking fro what 'Remy" (Pasted Below) said back in October 2010
Any news on if this has happened or is in the works? Tom
2010-10-16 16:49:32 PDT
Because I'm using Filemaker Go apps. I want to be able to call Zbar with an URL to get the barcode and than send back with an URL to Filemaker Go. I have been able to do it with Pic2shop, but I would prefer Zbar to do it.
I'm also using FM GO and would like to see a way to implement this. If you could set up a custom URL similar to pic2shop or CNS Barode in a future release, that would be great. Very nice reader; works quickly and accurately. Thanks.