Redth / ZXing.Net.Maui

Barcode Scanning for MAUI?
MIT License
434 stars 143 forks source link

Cannot detected on Oppo device #144

Open TanLV4 opened 8 months ago

TanLV4 commented 8 months ago

I'm using zxing.net.maui to scan QR codes. Everything works fine with version 0.3.0-preview.1. However, when I update to the latest version (0.4.0) and run it on an Oppo device, the OnBarcodeDetected event doesn't trigger when scanning QR codes. It's working fine on iOS and other devices, but there's an issue specifically with Oppo.

Moro890 commented 7 months ago

I'm using an Oppo A74 (Android 13), I've the issue on both 0.4.0 and 0.3.0-preview.1

Adrianotiger commented 7 months ago

Maybe there are some issues when the library tries to list all phone cameras. It works on my Find X3 (0.4.0). Try to post the output, there are some more info on it that can help.

You should see something like that:

[CameraRepository] Added camera: 0 [Camera2CameraInfo] Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3 [OplusCameraManagerGlobal] setClientInfo, packageName: com.companyname.maui, uid: 10656, pid: 6747 [CameraRepository] Added camera: 1 [Camera2CameraInfo] Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3 [OplusCameraManagerGlobal] setClientInfo, packageName: com.companyname.maui, uid: 10656, pid: 6747 ... [CameraStateRegistry] Recalculating open cameras: [CameraStateRegistry] Camera State
[CameraStateRegistry] ------------------------------------------------------------------- [CameraStateRegistry] Camera@d8d8b59[id=1] UNKNOWN
[CameraStateRegistry] Camera@f61b146[id=0] OPENING
[CameraStateRegistry] ------------------------------------------------------------------- [CameraStateRegistry] Open count: 1 (Max allowed: 1) [Camera2CameraImpl] {Camera@f61b146[id=0]} Opening camera. [Camera2CameraImpl] {Camera@f61b146[id=0]} Transitioning camera internal state: INITIALIZED --> OPENING [CameraStateMachine] New public camera state CameraState{type=OPENING, error=null} from OPENING and null [CameraStateMachine] Publishing new public camera state CameraState{type=OPENING, error=null}

ThinhKVT commented 5 months ago

Hi, My oppo and samsung a23 have same problem with ZXing stable version. Could you suggest any solution for the issue ? Thanks