Search code examples
androidiosbarcodebarcode-scanner

Does Android 5 or 6 (or future version) have a built-in barcode scanning API like iOS does?


Starting in iOS 7, Apple added a built-in basic barcode scanning with AV Foundation.

Does Android 5 or 6 (or any future version) have anything similar?

Just something basic like UPC, EAN, QR code, etc.


Solution

  • Android does not, but the Google Play Services Vision API does.

    To use it, you will need to add the Google Play Services SDK as a dependency in your app, and the end-user will need Google Play Services and Android 4.2.2 or newer installed on their device.

    The Vision API currently supports the following 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