From a8d225d49147b38c1d6ac6f4804302734a3f3f1a Mon Sep 17 00:00:00 2001 From: GKF Date: Tue, 11 Jun 2019 16:53:51 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/ui/qrcode/QrCodeActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/qrcode/QrCodeActivity.kt b/app/src/main/java/io/legado/app/ui/qrcode/QrCodeActivity.kt index d77022022..9b7ce0b13 100644 --- a/app/src/main/java/io/legado/app/ui/qrcode/QrCodeActivity.kt +++ b/app/src/main/java/io/legado/app/ui/qrcode/QrCodeActivity.kt @@ -98,11 +98,11 @@ class QrCodeActivity : BaseActivity(), QRCodeView.Delegate { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) - data?.let { + data?.data?.let { zxingview.startSpotAndShowRect() // 显示扫描框,并开始识别 if (resultCode == Activity.RESULT_OK && requestCode == requestQrImage) { - val picturePath = FileUtils.getPath(this, it.data) + val picturePath = FileUtils.getPath(this, it) // 本来就用到 QRCodeView 时可直接调 QRCodeView 的方法,走通用的回调 zxingview.decodeQRCode(picturePath) }