Closed jyasskin closed 7 years ago
I'd like to say in my defense :-) that the Section has an Issue 3 (the link might be stale)
Finalize the attributes of DetectedBarCode, taking e.g. the Android Barcode and Apple’s QICRCodeFeature into account.
Apple's CIDetector very loosely specifies ISO/IEC 18004:2006 version, so 2015's might very well not be recognized. Android QR code doesn't mention any specification at all.
It is, sadly, another example of what we discussed offline: most of these APIs are essentially hardware features, and hardware manufacturers will provide their clients the barest minimum information to work on. However, I don't think this should deter us from providing capabilities that native Apps are happy to use.
It might be a good idea to point out this situation in the Introduction of the Spec, so developers coming from diverse backgrounds can adjust their expectations according to these circumstances, WDYT?
I definitely don't mean to imply that you did anything wrong by having a vaguer spec than I'd like. :wink:
There should probably be a Web Platform Test for each piece of this spec, which asserts in this case that some very clear QR codes of various types are recognized, and some very clear non-QR codes are not recognized. Having that test suite will let you identify which kinds of QR codes the hardware is actually recognizing, and you should then put that in the spec. If some hardware is really out of the ordinary, it's probably better for users if the browser returns that the hardware doesn't exist, so the site falls back to its software implementation.
What's the spec used in zxing project?
Since is the only qr-code library available I think that it will become "the standard" by accident. I bet every android project that has qr support is using zxing...
Addressed by the commit above.
https://wicg.github.io/shape-detection-api/#barcode-detection-api says "QR code" but doesn't define what that means. Is ISO/IEC 18004:2015 the right spec? Wikipedia mentions "QR code models 1 and 2", which may not be covered by the 2015 spec; does the recognizer identify those?