Hello all! Can someone suggest a good library for ...
# compose-android
r
Hello all! Can someone suggest a good library for incorporating QR scanning into my app? I'm finding it a struggle to find a clearly documented one...
t
Does it have to be compose specific? I don't have any experience with implementing QR code scanning, but Google's library seems relatively straight forward to use: https://developers.google.com/ml-kit/vision/barcode-scanning/code-scanner (although you'll probably have to wrap it for compose).
m
The above is useful if you want to: 1. Not require your app to have camera permissions 2. Do not need a custom ui If this isn’t sufficient, i’d recommend just wrapping a camera-x preview view inside of an AndroidView composable. Here’s an article which shows you what’s required: https://blog.devgenius.io/qr-code-scanner-with-jetpack-compose-camerax-and-ml-kit-8e5a1d4a2fc9 NOTE: This article doesn’t address asking for camera permissions