Method to know the version of the QR

48 views
Skip to first unread message

Diego J Mitchell

unread,
Feb 22, 2021, 8:01:23 PM2/22/21
to zxing
Hello, i need to know the version of the QR scanned. Is there a method?
Thanks a lot. 
Diego

Sean Owen

unread,
Feb 22, 2021, 8:13:42 PM2/22/21
to zxing
Hm, good question. I don't think this is exposed right now. DecodeResult has a 'getOther()' method that returns something format specific, and that's QRCodeDecoderMetadata, but it doesn't include Version. I could imagine adding that. Would it be useful? for existing versions, I think you'd have to manually hack it by getting a BitMatrixParser on the decoded QR code and calling parseVersion() or something. 
What's the use case for it out of curiosity?

Reply all
Reply to author
Forward
0 new messages