Minor PR feedback. Switch to QR reader and specify imports.

This commit is contained in:
Kevin Gorham 2021-03-16 15:07:15 -04:00
parent b0843b9548
commit dfc6838bdf
No known key found for this signature in database
GPG Key ID: CCA55602DF49FC38
1 changed files with 6 additions and 2 deletions

View File

@ -3,14 +3,18 @@ package cash.z.ecc.android.ui.scan
import androidx.camera.core.ImageAnalysis
import androidx.camera.core.ImageProxy
import cash.z.ecc.android.sdk.ext.twig
import com.google.zxing.*
import com.google.zxing.BinaryBitmap
import com.google.zxing.NotFoundException
import com.google.zxing.PlanarYUVLuminanceSource
import com.google.zxing.Reader
import com.google.zxing.common.HybridBinarizer
import com.google.zxing.qrcode.QRCodeReader
class QrAnalyzer(val scanCallback: (qrContent: String, image: ImageProxy) -> Unit) :
ImageAnalysis.Analyzer {
private val reader = MultiFormatReader()
private val reader = QRCodeReader()
override fun analyze(image: ImageProxy) {
image.toBinaryBitmap().let { bitmap ->