How to read barcodes with the camera on Android?

前端 未结 9 1607
广开言路
广开言路 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: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

提交回复
热议问题