|
|
|
@ -20,7 +20,7 @@ class QrCodeActivity : BaseActivity<ActivityQrcodeCaptureBinding>(), OnScanResul |
|
|
|
|
override val binding by viewBinding(ActivityQrcodeCaptureBinding::inflate) |
|
|
|
|
|
|
|
|
|
private val selectQrImage = registerForActivityResult(ActivityResultContracts.GetContent()) { |
|
|
|
|
it.readBytes(this)?.let { bytes -> |
|
|
|
|
it?.readBytes(this)?.let { bytes -> |
|
|
|
|
val bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.size) |
|
|
|
|
onScanResultCallback(QRCodeUtils.parseCodeResult(bitmap)) |
|
|
|
|
} |
|
|
|
|