padawan-wallet icon indicating copy to clipboard operation
padawan-wallet copied to clipboard

QRCodes com.google.zxing.NotFoundException

Open Suraku opened this issue 1 year ago • 1 comments

Hi I've ran into an issue with QR code scanning not working on my OnePlus Nord CE 3 Lite. Exception is triggered with com.google.zxing.NotFoundException within the QRCodes.kt file.

Error

I've had no issue with my older One Plus 6T, so I'm not sure if this is a newer model phone issue?

Thought I'd have a go at trying a fix, and came across using Google's ML-Kit for barcode scanning, which looks to have done the trick.

implementation("com.google.mlkit:barcode-scanning:17.2.0")

Code snippet: MLKit

I'm not an Android developer, this is very much hacked together very roughly just as a POC to see if it fixes my issue, which it has. I'm wondering if this would be a better approach?

Suraku avatar Apr 19 '24 22:04 Suraku

Hey thanks for reporting the bug! I'm not sure what could trigger the exception. But the ML-Kit library is something I'd be interested in exploring for sure.

Would you want to open a PR for it? My only reservation would be around bundle size. It looks like the mlkit library adds 2.4 MB to your app size (something like 20% increase of Padawan), which is too bad for just needing to scan a QR code once in a while. But the xzing library is old and it's given me plenty of trouble in the past. A new solution might be nice.

thunderbiscuit avatar Apr 24 '24 17:04 thunderbiscuit

Closing this for now, but if someone is interested in picking it up let me know!

thunderbiscuit avatar Jul 30 '24 13:07 thunderbiscuit

Thanks for the code! I have used some to try out the ML Kit library.

thunderbiscuit avatar Jul 31 '24 18:07 thunderbiscuit