How to read barcodes with the camera on Android?

前端 未结 9 1585
广开言路
广开言路 2020-12-07 19:24

I want my application to recognize barcodes taken by camera. Is it possible using Android SDK?

Something like this: Barcode Scanner

相关标签:
9条回答
  • 2020-12-07 19:45

    You can also use barcodefragmentlib which is an extension of zxing but provides barcode scanning as fragment library, so can be very easily integrated.

    Here is the supporting documentation for usage of library

    0 讨论(0)
  • 2020-12-07 19:46

    2016 update

    With the latest release of Google Play Services, v7.8, you have access to the new Mobile Vision API. That's probably the most convenient way to implement barcode scanning now, and it also works offline.

    From the Android Barcode API:

    The Barcode API detects barcodes in real-time, on device, in any orientation. It can also detect multiple barcodes at once.

    It reads the following barcode formats:

    • 1D barcodes: EAN-13, EAN-8, UPC-A, UPC-E, Code-39, Code-93, Code-128, ITF, Codabar
    • 2D barcodes: QR Code, Data Matrix, PDF-417, AZTEC

    It automatically parses QR Codes, Data Matrix, PDF-417, and Aztec values, for the following supported formats:

    • URL
    • Contact information (VCARD, etc.)
    • Calendar event
    • Email
    • Phone
    • SMS
    • ISBN
    • WiFi
    • Geo-location (latitude and longitude)
    • AAMVA driver license/ID
    0 讨论(0)
  • 2020-12-07 19:50

    With Google Firebase ML Kit's barcode scanning API, you can read data encoded using most standard barcode formats.

    https://firebase.google.com/docs/ml-kit/read-barcodes?authuser=0

    You can follow this link to read barcodes efficiently.

    0 讨论(0)
提交回复
热议问题