Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Barcode.EAN_13 not recognized #7

Open
tobrun opened this issue Aug 17, 2015 · 5 comments
Open

Barcode.EAN_13 not recognized #7

tobrun opened this issue Aug 17, 2015 · 5 comments
Labels

Comments

@tobrun
Copy link

tobrun commented Aug 17, 2015

While trying out the sample code:

  • QR-scanning
  • Face recognition
    works as expected.

When I try to scan an EAN_13 barcode:

  • BarcodeTrackerFactory.create is never called

Also I tried to configure a specific barcode variant, but this resulted in same behaviour:

  • new BarcodeDetector.Builder(context).setBarcodeFormats(Barcode.EAN_13).build();
@pm0733464
Copy link
Contributor

This may be a camera focus issue -- some of the barcode formats work better when the camera is fully in focus.

Is your app using CameraSource? As discussed in another thread, this initial release does not have an auto camera focus option on CameraSource, but this will be added in a future release. In the meantime, you might try the workaround suggested by Aeefire in this thread:

#2

@jbilbo
Copy link

jbilbo commented Sep 5, 2015

I don't see the EAN_13 barcode as supported. Maybe that's why? Is it intended?

For 1D Bar Codes, these are:
AN-13
EAN-8
UPC-A
UPC-E
Code-39
Code-93
Code-128
ITF
Codabar

Source: http://android-developers.blogspot.co.uk/2015/08/barcode-detection-in-google-play.html

Update1: I tried myself and EAN_13 works, but yeah sometimes (specially when it's too close) because of the focus issue it's hard to read.
Update2: Nvm it's listed here as supported: https://developers.google.com/vision/barcodes-overview

@pm0733464
Copy link
Contributor

We have recently open sourced the CameraSource class:

https://github.com/googlesamples/android-vision/blob/master/visionSamples/barcode-reader/app/src/main/java/com/google/android/gms/samples/vision/barcodereader/ui/camera/CameraSource.java

This version includes an auto-focus option, which will probably help.

@jainkamini
Copy link

I am new in android .i have try QR_Code sample it is working fine . When I try to scan an EAN_13 barcode it is not working.i add this line in
new BarcodeDetector.Builder(context).setBarcodeFormats(Barcode.EAN_13).build();
i Check this link but i an not able to understand this code .can anyone help me how i add this code in my sample code.
https://github.com/googlesamples/android-vision/blob/master/visionSamples/barcode-reader/app/src/main/java/com/google/android/gms/samples/vision/barcodereader/ui/camera/CameraSource.java

@pm0733464
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants