Android Question Not solved [B4XPages] Barcode/QrCode scanner not detecting


Well-Known Member
Licensed User
Longtime User
Hi everyone, i developed an app that uses the barcode/qrcode reader.
i wanted to use b4xpages for the first time from the beggining of the project by following this example:

Now i finished everything.
On my honor 8A (Android 9) it works properly...
on my meizu m5c (Android 6.0) the camera preview is working.. but it does not find the qrcode in the image..

when it start this condition is fired in the CreateDetector sub
    Dim operational As Boolean = detector.RunMethod("isOperational", Null)
    If operational = False Then
        ToastMessageShow("Errore creazione detector", False)
    End If
it is NOT operational..

so.. this condition never fires (is the Camera1_Preview sub)
        Dim Matches As Int = SparseArray.RunMethod("size", Null)
        If Matches > 0 Then
            Dim barcode As JavaObject = SparseArray.RunMethod("valueAt", Array(0))
            Dim raw As String = barcode.GetField("rawValue")
            If LastReading <> raw Then
                FoundNewQR(raw) '<--- valore letto
            End If
        End If

there is something related to google play services, or something similar?
(p.s. i already put this line:
and also the part in the manifest)

Thanks in advance for any help
Last edited:


Licensed User
Longtime User
#AdditionalJar: play-services-vision
works if using in a Code Tag
Upvote 1