I have used codenameone codescanner library to read bar code. It uses third party scanner which if used separately works fine and is quick to read the bar code. But using co
Swift 5:
If you are using AVFoundation, you should use below metadata object types:
metadataOutput.metadataObjectTypes = [
AVMetadataObject.ObjectType.aztec,
AVMetadataObject.ObjectType.code128,
AVMetadataObject.ObjectType.code39,
AVMetadataObject.ObjectType.code39Mod43,
AVMetadataObject.ObjectType.code93,
AVMetadataObject.ObjectType.dataMatrix,
AVMetadataObject.ObjectType.ean13,
AVMetadataObject.ObjectType.ean8,
AVMetadataObject.ObjectType.face,
AVMetadataObject.ObjectType.interleaved2of5,
AVMetadataObject.ObjectType.itf14,
AVMetadataObject.ObjectType.pdf417,
AVMetadataObject.ObjectType.qr,
AVMetadataObject.ObjectType.upce]
and you can inform users that they should not bring the camera too close to the barcode. (for EAN barcodes)
Try setting the explicit code type you are trying to read e.g.:
Display.getInstance().setProperty("android.scanTypes", "UPC_E");
You can see the list of code types here.
Alternatively try the little monkey QR code library (it works with barcodes too) it's often better on Android.