Sample app showcasing how to implement QR Code Reading in Android using CameraX and 2 different libs:
It's worth mentioning that the final apk sizes using ZXing OR ML Kit are very different:
- Google ML Kit
- debug: 14.1 MB
- release: 12.5 MB
- ZXing
- debug: 5.2 MB
- release: 4.2 MB
- Just CameraX (running preview only) for comparison
- debug: 4.9 MB
- release: 4 MB
There are 2 main branches in the repo:
mlkit
: branch with the ML Kit implementation in:app
modulezxing
: branch with the ZXing implementation in:app
module
The implementation here was based on two posts: