I use com.google.android.gms.vision.barcode.BarcodeDetector
in order to read QR codes. The problem is these codes carry raw binary data; no phone numbers, no URLs, no geopoints... I cannot change these QR codes, because they are generated in a different application.
When I scan these QR codes using Android Barcode API, the resulting Barcode
object doesn't allow me to access the raw data, although it must know it!
All I get is "Unknown encoding"
message both in rawValue
and displayValue
properties.
Having a byte[]
property instead of two String
properties would make more sense, since QR codes can carry general data.
I don't see the point of hiding raw data byte array from developers. Could I somehow extend the BarcodeDetector
class or the Barcode
class to get what I need?
Edit:
This is an absolutely valid QR code, which cannot be read by Vision API, although it carries 1024 bytes of data:
QR Codes - raw binary data is related, but it doesn't solve my problem.
...vision.barcode...
api, in production code. Can you share an example QR? – Dissectnull
values or such in the data which makes the encoding fail. Seems extremely lame that the raw data aint available but.. Try filing an issue here. :( – Dissect