bar code scanner is too slow to read the code

后端 未结 2 539
时光取名叫无心
时光取名叫无心 2021-01-16 12:16

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

2条回答
  •  滥情空心
    2021-01-16 13:03

    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)

提交回复
热议问题