From 74d08b0c8cebb8e54c74aa3a933039d7d5b14b3f Mon Sep 17 00:00:00 2001 From: frankpreel Date: Thu, 16 May 2024 08:51:54 +0200 Subject: [PATCH] Analyze only QRCode --- .../java/net/sourceforge/opencamera/preview/Preview.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java index 79da1fd80..9eaf2a066 100644 --- a/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java +++ b/app/src/main/java/net/sourceforge/opencamera/preview/Preview.java @@ -60,6 +60,7 @@ import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; import androidx.core.content.ContextCompat; +import com.google.zxing.BarcodeFormat; import com.google.zxing.BinaryBitmap; import com.google.zxing.LuminanceSource; import com.google.zxing.MultiFormatReader; @@ -1137,7 +1138,9 @@ public class Preview implements SurfaceHolder.Callback, TextureView.SurfaceTextu MainActivity mActivity = (MainActivity) this.getContext(); if (MyDebug.LOG) Log.d(TAG, "Find QRCode qrcodeContent="+qrcodeContent ); - mActivity.qrImageAnalyzer.showQrDialog(result); + if (result.getBarcodeFormat() == BarcodeFormat.QR_CODE) { + mActivity.qrImageAnalyzer.showQrDialog(result); + } } catch (Exception e) { // K1ZFP TODO Error 2 } -- GitLab