Android does support registering a custom scheme. And I don't see
any harm registering it _BESIDES_ the current URL.
However I see some weird parameters to the custom scheme URL. What's
the idea of the code=<Image>? The request should have a browse-back
URL to point the user to after a successful scan. Optionally a list of
supported/requested barcode types. If you expect the application to
scan a bar-code from the web, I think someone has expressed security
concerns for that.
I still see a seriously degraded user experience for new users.
Is there any way for a web server to detect if the calling device
supports a qrcode scheme? Any headers?
2011/7/11 Kerem <kerem...@gmail.com>:
2011/7/11 Kerem <kerem...@gmail.com>:
>> Not a bad idea in general, but it would fail if the user has no
>> application to manage the protocol. The current address points to a
>> landing page for users without a barcode scanner installed. The custom
>> scheme is not suited for that, since it's not browsable.
>
> Yes, that's one downside for it. But there is no other way of doing
> this on iOS. See my comment about a landing page below.
Pity.
>> Android does support registering a custom scheme. And I don't see
>> any harm registering it _BESIDES_ the current URL.
>>
>> However I see some weird parameters to the custom scheme URL. What's
>> the idea of the code=<Image>? The request should have a browse-back
>> URL to point the user to after a successful scan. Optionally a list of
>> supported/requested barcode types. If you expect the application to
>> scan a bar-code from the web, I think someone has expressed security
>> concerns for that.
>
> For iOS, you need to support the URL to the image to be scanned, so
> that the app fetches the image from the URL, save it, then scan it.
> That's why there is a "code=" parameter. Be aware that I just made up
> the parameters from my head. They should be discussed and shaped
> accordingly if we are going to be serious about establishing a
> standard.
>
> Also, on iPhone you can't have a browse-back URL. But the user will be
> presented with standard choices from the app after a successful scan,
> like the code was scanned using the camera.
Well... This is not what the application work-flow is like.
1. The web-page requests a barcode scan via a special URL
2. The OS catches the special URL, and opens a LOCAL application.
3. The Barcode Scanner application scans a bar-code
4. The Barcode Scanner application forwards the user to the
browse-back URL with the code filled in.
There is no image stored anywhere, nor processed outside the scanner
application. The barcode scanning is done exclusively on the device.
No piece of the process is done at the server. That's the whole point!
>> I still see a seriously degraded user experience for new users.
>
> Perhaps the user can be directed to a landing page first, which
> redirects to the qrcode:// scheme. And that page can have explanations
> on what to do if a "cannot open page" error occurs. This should be
> done by the website owner though, and it wouldn't be a part of the
> standard I am proposing.
>
>> Is there any way for a web server to detect if the calling device
>> supports a qrcode scheme? Any headers?
>
> I don't think this is possible.
I took a quick look over The Internet, and came to a similar
conclusion. There is a way for an application to check for the barcode
scanner, but not for a web page...
I do not own any iOS devices, but here's a thought: if one embeds an
inner frame in the web page and points it to qrcode:// what happens?
Can a JavaScript check the content of the frame, and see if there is
something that can tell one if a scanner is present? I am going to
perform a similar check on an Android device.
Perhaps in the end we can work around most of the problems with a
JavaScript tool?
> Kerem
2011/7/11 Kerem <kerem...@gmail.com>:
> The process will also be free from the server side on iOS, but it must
> be different on iOS.
>
> The webpage has a QR Code (say it resides on http://example.com/code.png)
> on it that has a href to a qrcode:// scheme (or a landing page as I
> mentioned). My proposed scheme would be like:
>
> qrcode://scan?code=http://example.com/qrcode.png (the parameter should
> be urlencoded though)
>
> The user clicks on the code. When the device is redirected to such
> URL, iOS looks for an app that registered this scheme and calls it.
> Then the app fetches the image from the code parameter, scans it and
> displays options to the user. It is impossible to get back to the page
> that initiated the scan automatically.
>
> It won't be the same experience on both platforms, but this way, at
> least a person will be able to scan an image by just clicking on it
> instead of tapping and holding on it, saving it, opening the scanner
> app manually, selecting to scan from the photo albums. :)
You INSIST on scanning a barcode that's on an image available on the
Internet. That is definitely _NOT_ what the application is about. The
application is expected to help the user scan a barcode that's
available on a real-life media (paper, screen, wall, window, etc.)
using the built-in camera.
Scanning a barcode that's available on a web-page is *completely*
useless, since the image can be a link, pointing to the target URL.
The user should simply click the image. Going through a scanner is...
Well... USELESS!
The Web integration is designed to help a web application
effectively scan a barcode that the user is looking at. That will
reduce the clutter a user has to go through to enter information in
the device. QR codes are but one case, product codes are another.
>> Perhaps in the end we can work around most of the problems with a
>> JavaScript tool?
>
> This can be done I suppose.
That's good to hear.
> Kerem
2011/7/11 Kerem <kerem...@gmail.com>:
>> You INSIST on scanning a barcode that's on an image available on the
>> Internet. That is definitely _NOT_ what the application is about. The
>> application is expected to help the user scan a barcode that's
>> available on a real-life media (paper, screen, wall, window, etc.)
>> using the built-in camera.
>>
>> Scanning a barcode that's available on a web-page is *completely*
>> useless, since the image can be a link, pointing to the target URL.
>> The user should simply click the image. Going through a scanner is...
>> Well... USELESS!
>
> Ah, OK! I misunderstood the intent here then. Well, on iPhone you can
> still call an app for scanning using a custom scheme, but it will
> never be able to return to a callback URL.
The browse-back URL is not «returned», but rather opened! That way
the user feels as if part of the web application works on his device,
and has a very smooth transition between screens. Can't an application
on the iOS open an arbitrary URL in the browser? I will be VERY
surprised if it's not possible...
It's a very neat «trick» the developers of ZXing implemented. I
suspect MANY web application developers would like the integration
with iPhone.
> I still think scanning a QR Code that is on a webpage is not
> completely useless, because people already add vCard information or
> information alike that can populate information.
Well... I consider linking to a .vcf file a better way, since QR
Codes use the bit limited ME-Card format. Also the device may have a
nice application that does .vcf import (hTC devices do). Currently
sharing a contact card via QR-Code/ME-Card has quite a few drawbacks
(mostly due to limited Android API). With the .vcf way I can import
pictures, multiple addresses and phone numbers, VoIP numbers, Instant
Messenger addresses, and much more, that is not available otherwise.
> Kerem
Hi Christopher,We're finding that even in Android the callback URL is opened in a new tab. How did you make it open in the same browser window?